Commit graph

55 commits

Author SHA1 Message Date
Patrick Walton
3bf779cd21 ports/cef: Use the CEF translator tool to generate the full set of CEF
bindings.

This replaces hand-implemented CEF bindings with proper Rust wrappers
automatically generated from the C++ headers. This means that, whenever
CEF's C++ headers change, we can easily generate both the appropriate C
API and the appropriate Rust API. It eliminates much of the hand-written
unsafe code within the CEF port, because the CEF translator tool now
knows how to generate Rust smart pointer wrappers for each class that
corrently perform reference counting.

Additionally, this commit adds utility macros (located in `macros.rs`)
that make it easier to correctly expose Rust objects as CEF objects.
They handle the marshaling of objects between Rust and CEF properly.
The net result of this is that you can write mostly-natural-looking Rust
in the CEF port and interact with it with a natural-looking C++ API on
the embedding side.

This setup relies on the branch of CEF located here:

    https://github.com/pcwalton/chromium-embedded-framework

To regenerate, follow the instructions in `ports/cef/README.md`. For
convenience, and because I don't anticipate the API to change much, I
have vendored in all of the appropriate interfaces.
2014-11-27 10:31:32 -06:00
Mike Blumenkrantz
d4ddfaa623 embedding: redo browser creation, split after_created COM to separate function
this causes the callback to run at the expected time for applications that may depend on the browser loop having started or somesuch
2014-11-21 21:54:09 -05:00
Mike Blumenkrantz
8aceb59824 embedding: redo browser creation and message loop code to be more CEF-like
big thanks to @alexcrichton for his help with this
2014-11-21 21:54:09 -05:00
Keegan McAllister
2f46b9aede Update the CEF port 2014-09-20 13:00:06 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/embedding/browser.rs (Browse further)