CEF is based on chromium and is also a multi-process model. For the process model, refer to here: Https://www.chromium.org/developers/design-documents/process-models. I also saw a Korean writing renderer process article, also very good, here: http://chromium-kr.blogspot.com/2012/06/about-renderer-process.html.
The CEF process model, also described here is part of the description: Https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage. CEF3 default to use multiple PROCESSESS,CEF1 to support a more stable single-process model by default.
The process of chromium is divided into several categories (content/public/common/content_switches.cc with process parameter definitions, Content/app/content_main_ runner.cc the different processes in the process):
- Browser (default to browser process if no type parameter)
- Renderer (krendererprocess)
- Plugin (kpluginprocess)
- Ppapi-broker (kppapibrokerprocess)
- Ppapi (kppapipluginprocess)
- SANDBOX-IPC (ksandboxipcprocess)
- Utility (Kutilityprocess)
- Zygote (Kzygoteprocess,linux)
- Gpu-process (kgpuprocess)
This article will refer to browser, PPAPI, renderer, GPU, the other I did not study, do not know what to do ...
CEF supports many command-line parameters (switches). The following comments in the source file define the switches that it supports:
- tests/cefclient/common/client_switches.cc
- base/base_switches.cc
- cef/libcef/common/cef_switches.cc
- chrome/common/chrome_switches.cc (not all apply)
- content/public/common/content_switches.cc
Most of the chromium swithes also applies to CEF, which can be consulted here: http://peter.sh/experiments/chromium-command-line-switches/. Of course you can also refer to here: Http://www.chromium.org/developers/how-tos/run-chromium-with-flags.
Process Model Switch Parameters
All right, here's the key to the process model-related switches in several parameters (the Ppapi is dead, and most of my explanation is by http://peter.sh/experiments/chromium-command-line-switches/ in English).
Running the Ppapi plugin within the process, plus this parameter to run the Cef,ppapi plugin and browser is not a process ... It's a process with renderer .
When this parameter is specified, the PPAPI plug-in is run in a separate PPAPI process, with "–type=ppapi" in the command-line arguments at the start of the process.
This is the default behavior.
Each site is assigned a process, and multiple pages of one site are processed within the same renderer process. (such as different pages under the same domain name will be considered the same site)
This is the default behavior of Chrome.
Each tab-related page is assigned a renderer process. A tab may have multiple pages, such as a page jump caused by JS or page events.
Force a site to assign a dead loyalty process, this process is not the site is not married, married on the mindedness. See here for details: http://www.chromium.org/developers/design-documents/site-isolation.
In multi-process mode, specifies that some apps run in the main process, and its value may be a comma-delimited list, such as:
Single-process mode run CEF, open this switch, browser, renderer, gpu-process and other processes are merged in a process, but PPAPI will run a separate process.
Limit the number of renderer processes. The chromium default is to calculate the maximum value of the renderer process based on the system configuration (primarily memory).
Using process model switches in combination
I want to use a single-process CEF (CEF1 is a single-process model) and want to use the new features of chromium, so we still have to use CEF3. It can be argued that CEF3 's multi-process model is unstable, see the discussion here: http://www.magpcss.org/ceforum/viewtopic.php?f=7&t=13427. And here: http://magpcss.org/ceforum/viewtopic.php?f=6&t=3427. Later found chromium also said so, see here: Https://www.chromium.org/developers/design-documents/process-models.
But if you really want to use it, you can still control it by switches.
- PPAPI, renderer and browser
To achieve the unity of the three, pass the following parameters to CEF:
--single-process --ppapi-in-process
- Renderer, browser unity, PPAPI plug-ins run alone in the PPAPI process
Pass the following parameters:
--single-process --ppapi-out-of-process
Other reference articles:
- CEF Windows Development Environment Setup
- CEF Load Ppapi Plugin
- VS2013 compiling the simplest Ppapi plugin
- Understanding the design of PPAPI
- Ppapi plugin-to-browser interaction process
- Windows compiled from the source CEF
- Media_stream_video Example of compiling PPAPI
- PPAPI plug-in drawing and input event handling
- Creating a local window in the PPAPI plug-in
- PPAPI plug-in communication with the browser
- Skia compiled from source under Windows
- Using Skia drawing in the Ppapi plug-in
- Load a picture resource in a DLL to generate a Skbitmap object in Skia
- Ppapi+skia implementation of Graffiti Board
- 3D graphics interface using chromium in PPAPI
- Using OpenGL ES drawing in Ppapi
- JS in CEF interacts with C + +
- Communication between browser process and render process in CEF
Multi-process model and related parameters of chromium and CEF