在Unity中使用Chrome Embedded Framework (CEF)时，需要用到CEFGlue之类的开源库。
For a general overview of CEF3 usage see the GeneralUsage Wiki page.
1. What is the difference between CEF1 and CEF3?
CEF1 uses a single-process architecture and CEF3 uses a multi-process architecture. CEF3’s architecture is very similar to the Chrome browser and tends to have better performance, stability and new features as a result. See the Architecture Wiki page for complete details. See the BranchesAndBuilding Wiki page for information about release branches.
2. How long will CEF1 be supported?
CEF1 is no longer supported. See this thread for details.
3. How long will the [some number] release branch of CEF be supported?
See this post for details.
4. Can I use and distribute CEF with my proprietary application?
Yes. CEF is licensed using the BSD open source license. See the LICENSE.txt file included with each binary distribution or view it online here.
5. CEF has a lot of dynamic libraries. Can I statically link all of these libraries into my closed source application?
Probably not legally. Chromium is based on third-party libraries with many different licenses. Visit “about:credits” in a CEF3 application to see the complete list. Statically linking these libraries into a closed source application would likely violate the terms of at least a few of these licenses. You should consult legal counsel if you need a definitive answer.
6. CEF libraries are really big. Can I make them smaller?
Maybe, it depends on your requirements. Go here for an interesting perspective on where Chromium file size comes from. If you’re not concerned about load time you can use PECompact or UPX to compress the binary files. In most cases, though, it’s probably best to keep the CEF binary files as-is and compress them as part of an installer executable.
7. How do I know which files from the binary distribution to include with my application? Can I exclude [some file]?
See the README.txt file included with the binary distribution. It provides information about each binary file and whether that file is optional or required.
8. How do I create an application that does [list of requirements]?
Read the Tutorial or GeneralUsage wiki pages for an overview of how CEF works. Browse the CEF header files in the include directory to get a general idea of CEF’s capabilities. When you’re ready to begin writing your application start with the cefclient or cefsimple sample application included with the binary distribution and slowly remove the parts that you don’t need checking that everything still works as you proceed. Then add any new functionality using the same approach.
9. How do I use [insert class/function name here]?
All CEF classes and functions are documented in the header file. You can also find CEF1 API documentation online here and CEF3 API documentation online here. The cefclient sample application demonstrates many capabilities and is a good reference as well.
10. How do I build CEF from source code?
See the BranchesAndBuilding Wiki page for complete details.
11. I’m getting [some build error] on [some platform], what do I do?
Try Googling the error message. In most cases someone has probably already gotten your error and found a solution.
12. I’m trying to build using [some nonstandard/really new/really old operating system or compiler], what do I do?
CEF developers only test with standard build tools on Windows, Mac OS X and Linux. See the BranchesAndBuilding Wiki page for build requirements. We don’t test other configurations and, if Googling the error message doesn’t help, we probably can’t help either.
14. I’m trying to display local files using the file:// protocol and it doesn’t work or I’m getting security warnings, what do I do?
The file:// protocol receives special handling and security restrictions inside of Chromium. The best way to include local files in your application is by using a custom scheme handler via CefRegisterSchemeHandlerFactory() or the (CEF3) CefRequestHandler::GetResourceHandler() method. See the “Request Handling” section of the GeneralUsage Wiki page for more information.
15. When is a new render process created in CEF3?
New render processes will generally be created when a new browser is created and when an existing browser navigates from one origin to another (for example, from “http://www.google.com” to “http://www.facebook.com”). See CefRenderProcessHandler for methods that will be called in the render process. See CefBrowserProcessHandler for methods that will be called in the browser process. See process-models documentation for additional technical details.
16. How do I send information between the browser and render processes in CEF3?
CefBrowser and CefFrame objects exist in both the browser and render processes. To provide all render processes with the same information implement CefBrowserProcessHandler::OnRenderProcessThreadCreated() in the browser process which will pass information to CefRenderProcessHandler::OnRenderThreadCreated() in the render process. To provide information dynamically use process messages (CefProcessMessage) which are associated with a specific CefBrowser instance and are sent using the CefBrowser::SendProcessMessage() method. See the “Inter-Process Communication (IPC)” section of the GeneralUsage Wiki page for more information.
17. How are command line arguments used in CEF3?
Many features in CEF3 and Chromium can be configured using command line arguments. These arguments take the form “–some-argument[=optional-param]” and are passed into CEF via CefExecuteProcess() and the CefMainArgs structure. To disable processing of arguments from the command line set CefSettings.command_line_args_disabled to true before passing the CefSettings structure into CefInitialize(). To specify command line arguments inside your program implement the CefApp::OnBeforeCommandLineProcessing() method. See the “Command Line Arguments” section of the GeneralUsage Wiki page for more information.
18. My CEF3 application is large, takes a long time to load, or is otherwise unsuitable for non-browser processes. What are my alternatives?
You can create a separate executable project with minimal contents that is only used when launching non-browser processes. See the “Application Structure” section of the GeneralUsage Wiki page for more information.
19. How can I debug multiple processes in my CEF3 application?
Platform-specific debugging tips are also available for Windows, Mac OS X and Linux.
20. Why does my CEF3 application take a few seconds to display web content during startup?
Web content loading during application startup can be delayed due to network proxy resolution (for example, if “Automatically detect proxy settings” is checked on Windows). For best user experience consider designing your application to first show a static splash page and then redirect to the actual website using meta refresh — the redirect will be blocked until proxy resolution completes. For testing purposes proxy resolution can be disabled using the “–no-proxy-server” command-line flag. Proxy resolution delays can also be duplicated in Google Chrome by running “chrome –url=…” from the command line. See the “Proxy Resolution” section of the GeneralUsage Wiki page for more information.