Chromium Embedded Framework Chinese Document (introduction)

Source: Internet
Author: User

Transferred from: http://www.cnblogs.com/think/archive/2011/10/06/CEF-Introduce.html

Brief introduction

The Chromium Embedded Framework (CEF) is an open source project founded by Marshall Greenblatt in 2008 and is dedicated to developing a Web control based on the Google Chromium project. CEF currently supports a variety of programming languages and operating systems, can be easily integrated into existing or new applications, design, it pursues high performance, but also the pursuit of ease of use, its basic framework through the native library to provide C and C + + programming interface, These interfaces isolate the host program from the implementation details of chromium and WebKit, allowing the browser to seamlessly integrate with the application and support custom plug-ins, protocols, JavaScript objects, and extensions. The host program can also control resource loading, page jumps, context menus, printing, and so on as needed. These benefits are essentially provided in support of Google Chrome's equivalent efficiency and HTML5 technology available.
A large number of individuals and organizations contribute time and resources to the development of CEF, but we need more community input to support CEF core projects and projects that extend to support other languages and frameworks (see the section on extending projects). If you are interested in providing time and money support for CEF, see

CEF Donations page.

Compiling the release version

Compiling the release version, which includes all the files required to build a CEF-based application, is available for download in the download section, which can be used independently and not dependent on CEF or chromium source code.

Source Code Release version

The CEF project is an extension project for the Chromium Project (http://chromium.org), so it is necessary to download the chromium source code before compiling the CEF source code (see the Download method http://dev.chromium.org/ Developers/how-tos/get-the-code) and install all dependent projects according to your chosen system and compile instructions, then put CEF files on top of Chromium's SRC directory, with base/chrome/ Thrid-party These directories together, let's say if your Chromium installation directory is C:\SVN\CHROMIUM\SRC then CEF files should be in C:\SVN\CHROMIUM\SRC\CEF. Chromium_build_compatibility.txt file has a description of CEF and CHROMIUM version compatibility, if you want to upgrade CHROMIUM to a version, use
gclient sync--revision [email protected]####--force,

In addition, the Deps file will ensure that other directories are downloaded in the appropriate form. In most systems, compiling requires at least 4GB of memory.

Compiling under Windows

Follow your Visual Studio version of Windows build instructions, run the Cef_create_projects.bat script under the CEF root directory, and generate the visual Stodio project files based on the Gyp configuration. If you have both VS2005 and VS2008 installed on your machine, you can specify the version by setting the GYP_MSVS_VERSION environment variable to "2005" or "2008" before running the cef_create_projects script.

By integrating the Gclient tool into CEF, you can automatically download CEF source code updates and run cef_create_projects after chromium source code updates . Edit the . gclient file that is located in the parent directory of the Chromium src directory ("C:\svn\Chromium" in the above example) and add the following line to the existing solutions array:

Solutions = [{#Existing definitions here ...}, # BEGIN NEW LINES {"name": "Src/cef", "url": "http: Chromiumembedded.googlecode.com/svn/trunk ",}, #END NEW LINES]
Compiling under Mac OS x

Currently only supported for Mac OS X 10.6 (Snow Leopard) and 10.7 (Lion), the compilation results can be run on 10.5, 10.6 and 10.7. According to Mac build instructions the correct configuration system, if it is 10.7 and Xcode 4, follow the additional compilation instructions in Xcode4tips.

Run cef_create_projects.sh under the CEF root directory to generate the Xcode project files based on the Gyp configuration.

Compilation under Linux

In development.

Extension Project

The CEF infrastructure supports the C and C + + languages, and thanks to the hard work of other maintainers, CEF can support more programming languages and frameworks. These extensions are not maintained by the CEF team, so if you have any questions, please contact the maintainer directly for the purpose.

    • . net-https://github.com/chillitom/cefsharp
    • . net-https://bitbucket.org/fddima/cefglue
    • delphi-http://code.google.com/p/delphichromiumembedded/
    • java-http://code.google.com/p/javachromiumembedded/

If you maintain an item that is not on this list, please post to CEF Forum or contact Marshall directly.

Support

The General Usage Wiki page provides an overview of using CEF, and CEF support and related discussions are conducted in CEF forum.

Help

CEF still has a lot of work to do, if you want to contribute to CEF Please check the open status of issue, or search for Todo in CEF source code, we also need to write test cases for all supported features.

Breaking Changes

All versions are not listed here, please see the changes list for the full version.

September: Compile version 293, add support for VS2010, and include the following improvements and bug fixes:

    • Renamed char16_t to Char16 fix VS2010 compilation errors caused by char16_t into built-in type (issue #243).
    • The custom Sheme supports asynchronous processing of responses (issue #269).
    • Add Cefdraghandler support drag-and-drop data with the experience of canceling a drag-and-drop request (issue #297).
    • Add the Cefbrowser::hasdocument () method to test whether the document has finished loading (issue #307).
    • The Cefbase class adds a virtual destructor (issue #321).
    • Fixed a memory leak caused by using V8 (issue #323).
    • Improves V8 string conversion efficiency (issue #323).
    • Increased exception return capability for V8 accessors (issue #327).
    • If the V8 handler does not return a value, the return undefined replaces the return null (issue #329).
    • Due to the problem of implementing the bug, the synthesis acceleration is turned off by default (issue #334, Issue #335, Issue #337).

August 9,: Binary Release 275 contains the following enhancements and bug fixes.

    • Turn off support for the touchscreen to make the Google Map API function properly (issue #134).
    • Fixed a bug (issue #192) for a dead loop when performing a large number of synchronous load requests.
    • Fix onresourceresponse spelling errors (issue #270).
    • Fixed a threading problem (issue #277) that would cause crash in some cases when the machine was shut down.
    • Added accelerated_video_enabled, accelerated_drawing_enabled and accelerated_plugins_enabled Browser settings (issue #278).
    • Add the D3dx9_43.dll and D3dcompiler_43.dll files (issue #280) needed to accelerate content on some Windows machines.
    • Clears the modal window callback implementation (issue #281).
    • Turn off voice input to avoid crash on the Google search page point microphone icon. (issue #282).
    • Disables HTML5 drag (issue #284) when drag_drop_disabled is set to true.
    • Fixes an issue that crash when canceling the popup window (issue #285).

June,: Binary Release 259 significantly revamps the CEF API and contains the following enhancements and bug fixes.

  • Use the angle library to support GL (issue #136).
  • Cefv8value Add Date Type support (issue #190).
  • Add a workaround for the Syncrequestproxy deadlock problem (issue #192).
  • Replace Cefhandler with a new cefclient interface and separate handler interfaces (issue #218).
  • ADD support for virtual inheritance to allow multiple cefbase parented interfaces to being implemented in the same class (IS Sue #218).
  • Replace cefthreadsafebase with IMPLEMENT macros to support virtual inheritance and to only provide locking implementations When needed (issue #218).
  • Move the cefbrowsersettings parameter from Cefinitialize to Createbrowser (issue #218).
  • Add a new Cef_build.h header that provides platform-specific and OS defines (issue #218).
  • Introduce the use of OVERRIDE to generate compiler errors on Windows If a child virtual method declaration doesn ' t match t He parent declaration (issue #218).
  • Move CEF header Files This should not being directly included by the client to the "Include/internal" folder (issue #218).
  • ADD support for Navigator.online and Online/offline window events (issue #234).
  • Use Ndebug instead of _Debug Because _debug are not defined on MAC (issue #240).
  • Add Onresourcereponse and Cefcontentfilter for viewing and filtering response content (issue #241).
  • ADD support for setting response header values (issue #246).
  • Break Cefregisterscheme to separate Cefregistercustomscheme and Cefregisterschemehandlerfactory functions (issue #246 ).
  • Allow registration of handlers for built-in schemes (issue #246).
  • Supply scheme and request information to Cefschemehandlerfactory::create (issue #246).
  • ADD crossoriginwhitelist functions for bypassing the same-origin policy with both built-in and custom standard schemes (I Ssue #246).
  • ADD support for modal dialogs (issue #250).
  • ADD Support for Ime-aware applications (issue #254).
  • Restore keyboard focus on Window activation (issue #256).
  • Fix bug when dragging to a window before mouse events has been detected (issue #262).

May : Binary Release 231 contains the following enhancements and bug fixes.

    • ADD Cookie get/set Support ( issue #88  ).
    • allow custom schemes to cause redirects ( issue #98  ).
    • Set The Libcef.dll version number to the build revision number ( issue #108  ).
    • ADD support for returning a HTTP status code from Handlebeforeresourceload and custom scheme handlers via the CEFRESP Onse Class ( issue #202  ).
    • ADD support for V8 accessors and entering a V8 context asynchronously ( issue #203  ).
    • Don ' t load URLs twice for popup windows ( issue #215  ).
    • make modal popup windows behave the same as Non-modal popup windows ( issue #216  ).
    • Force Flash and Silverlight plugins-windowless mode when rendering off-screen ( issue #214  ).
    • Don ' t download files that would be loaded by a plugin ( issue #227  ).
    • Add a Cefdomnode::issame () method for comparing Cefdomnode objects.

March: Binary Release 212 contains the following enhancements and bug fixes.

  • ADD Off-screen rendering support (issue #100).
  • ADD Persistent storage support for cookie data (issue #193).
  • Allow registration of non-standard schemes (issue #195).
  • Improve the behavior of Handleaddresschange, Handletitlechange, Handleloadstart and Handleloadend notifications (issue #2 00).
  • Respect the WS_VISIBLE flag when creating browser windows (issue #201).
  • Fix a bug in cefweburlrequest this could result in inappropriate calls to Cefhandler methods (issue #204).
  • Add A history entry when navigating to anchors within the same page (issue #207).
  • ADD a HANDLENAVSTATECHANGE notification for Back/forward state changes (issue #208).
  • Fix crash when using WebKit Inspector break points (issue #210).
  • ADD support for retrieving the values from DOM form elements using Cefdomnode::getvalue.
  • Add the Cefrunmessageloop () function for efficient message loop processing in single-threaded message loop mode.

February: Binary Release 195 contains the following enhancements and bug fixes.

    • ADD the Cefweburlrequest class, supports direct loading of URL resources from client applications (issue #51).
    • ADD cefdom Classes and the Cefframe::visitdom method that allow direct access to and modification of the DOM (issue #60) .
    • ADD support for the HTML5 drag and drop APIs and the dragging content to other applications or the desktop (issue # 140).
    • Add a Cefv8context object and Cefv8value::executefunctionwithcontext method to support asynchronous V8 callbacks (issue # 188).
    • Cefregisterplugin now is supports a single MIME type per registration.
    • Fix a bug where URL and title change notifications were not being sent for cefframe::loadstring.

February 1,: Binary release 181 is the last binary release, that includes libraries for VS2005. It contains the following enhancements and bug fixes.

  • Improve thread safety by making some methods only callable on the UI thread (issue #175).
  • Add Newcefrunnablemethod and Newcefrunnablefunction templates (in cef_runnable.h) that simplify task posting (issue #175 ).
  • Add A Boolean argument to the Handleloadstart and Handleloadend events that would be true while the main content frame is L Oading (Issue #166, Issue #183).
  • Add an HTTP status code argument to the Handleloadend event (issue #177).
  • Handleaddresschange and Handletitlechange events for the main content frame load (issue #166)
  • Pass the URL for new popup windows to the Handlebeforecreated event (issue #5).
  • ADD members to the CEFSETTINGS structure for specifying log file location and severity level (issue #172).
  • ADD single sign-on Support (issue #148).
  • ADD zooming Support (issue #116).
  • ADD Developer Tools Support (issue #127).
  • ADD a handleprotocolexecution event for handling unregistered protocols (issue #155).
  • ADD a handlestatus event for status messages, mouse over URLs and keyboard focus URLs (issue #61).
  • ADD support for creating and parsing URLs via Cefcreateurl and Cefparseurl (issue #181).
  • Fix the problem with frame activation when displaying SELECT list popups (issue #169).
  • Accelerated compositing and HTML5 video now work together (issue #143).

November: Revision 149 introduces a number of long-awaited features and a few important bug fixes.

    • The API now uses cefstring and cef_string_t types instead of std::wstring and wchar_t. The new types support conversion between ASCII, UTF-8, UTF-16 and UTF-32 character formats and the default character type Can is changed by recompiling CEF (issue #146).
    • Allow customization of the global and Per-browser settings for everything from user-agent and plugin search paths to specific WebKit features (issue #145).
    • ADD support for accelerated compositing and fast WebGL (issue #136). You'll need to disable accelerated compositing to watch HTML5 video with this release (issue #143).
    • Expose Popup window feature information via the Cefpopupfeatures argument passed to cefhandler::handlebeforecreated (issu e #135).
    • Fix a crash caused by flash-related JavaScript (issue #115).

November,: Revision 137 provides the first working build of CEF for the Mac OS X platform (issue #68). There ' s still a lot of work required to bring it up to par with the Windows port. Missing features is indicated by "TODO (port)" comments in the source code. Help with fixing bugs and implementing missing features are welcome.

October: Revision 126 disables WebGL support due to performance problems with the default Chromium implementation. WebGL support would be re-enabled once a better-performing implementation is available (issue #136).

    • Add a Cefhandler::handledownloadresponse () method for handling content-disposition initiated file downloads (issue #6).
    • The ADD XML parsing support with Cefxmlreader and Cefxmlobject classes (issue #28).
    • ADD Zip Archive reading support with Cefzipreader and Cefziparchive classes (issue #30).
    • Add a new Cef_wrapper.h header file that exposes helpful utility classes provided as part of the Libcef_dll_wrapper target .

October,: Revision causes CEF to ignore the ' Automatically detect settings ' option under LAN settings in order to fix a problem With slow resource loading on Windows (issue #81). Manual configuration under LAN Settings is still respected.

    • Add a Cefbrowser::reloadignorecache () method and Menu_id_nav_reload_nocache MENU support. (issue #118).
    • ADD support for audio playback with HTML5 video (issue #121).
    • Fix Back/forward Navigation When the history contains pages, failed to load (issue #125).
    • Change the CEF user-agent product version to "chrome/7.0.517.0"

August,: Revision re-introduces the Cefhandler::handlejsbinding method. The memory leaks that necessitated the elimination of this method has now been fixed (issue #72).

    • The Cefrequest argument to Cefhandler::handlebeforeresourceload can now is modified allowing the request to being changed on The fly (issue #41).
    • A default ToolTip implementation is today provided and ToolTip text can be modified using cefhandler::handletooltip (issue #61).
    • Printing paper size, orientation and margins can now is changed using Cefhandler::handleprintoptions (issue #112).
    • Find in page with result highlighting are now supported using Cefbrowser::find, cefbrowser::stopfinding and Cefhandler::han Dlefindresult.
    • The binary release of revision provides libraries for both Visual Studio 2005 and Visual Studio 2008. It can downloaded from the Project Downloads page.

April 7: Revision eliminates the Cefhandler::handlejsbinding method. This modification addresses memory leaks that many users has been reporting. For more information see issue #72.

October 2,: Revision adds Gyp support for generating the CEF project files. This makes it easy-to-build CEF with both VS2005 and VS2008. See the "Source Distributions" sections above for additional details.

August: Revision PNs adds support for custom scheme handlers. Use the new Cefregisterscheme () function in combination with the Cefschemehandlerfactory and Cefschemehandler classes to C Reate handlers for requests using custom schemes such as Myscheme://mydomain.

July:  revision 32 helps to speed up the addition of new features and bugs fixes to C Ef. It adds the CEF patch application Tool and the "Patch" project which together support automatic application of patches to The Chromium and WebKit source trees as part of the build process. See the README.txt file in the new patch directory for additional information.

July 8,: CEF now have a dedicated build bot thanks to Nicolas Sylvain and Darin Fisher over at Google. The build bot synchronizes to all Chromium revision and then builds CEF, reporting on any compile errors that occur. Have a build bot for CEF would help the Chromium developers avoid accidentally breaking API features required by CEF, and Help the CEF developers keep up with the frequently changing Chromium HEAD revision. You can view the build bot output at http://build.chromium.org/buildbot/waterfall.fyi/waterfall?branch=&builder= chromium+embedded

June: Revision adds the CEF Translator Tool which facilitates automatic generation of the C API header file (cef_capi.h) and Ctocpp/cpptoc wrapper classes. See the translator. README.txt file in the new tools directory for additional information. Introduction of this tool required minor changes to the CEF C + + and C APIs.

    • The C + + ' arguments ' attribute of Cefv8handler::execute () and cefv8value::executefunction () now have the ' const ' qualifier.
    • C API global function names that were previously in the Cef_create_classname () format is now in the Cef_classname_create ( ) format.
    • The C API cef_frame_t::get_frame_names () member function now has return type ' void ' instead of ' size_t '.
    • The C API cef_frame_t::execute_javascript () member function has a been renamed to Cef_frame_t::execute_java_script ().

May ,: Revision introduces the major changes to the CEF framework.

  • Frame-dependent functions such as loading content and executing JavaScript has been moved to a new Cefframe class. Use the new Cefbrowser::get*frame () methods to retrieve the appropriate Cefframe instance. A Cefframe instance would now also is passed to Cefhandler callback methods as appropriate.
  • The CEF JavaScript API now uses the V8 framework directly instead of creating npobjects. JavaScript object hierarchies can be written in native C + + code and exported to the JavaScript user-space, and User-space Object hierarchies can accessed from native C + + code. Furthermore, support for the V8 extension framework has been added via the new Cefregisterextension () function. The Cefjshandler and Cefvariant classes has been removed in favor of new Cefv8handler and Cefv8value classes. To attach values to the JavaScript ' Windows ' object must now implement the Cefhandler::handlejsbinding () callback Metho D instead of calling the (now removed) Cefbrowser::addjshandler () method.

Chromium Embedded Framework Chinese Document (introduction)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.