Compare commits
3 Commits
69ce47ae4c
...
44f7b57e79
Author | SHA1 | Date |
---|---|---|
Marshall Greenblatt | 44f7b57e79 | |
Marshall Greenblatt | 331f668eee | |
Marshall Greenblatt | 14bd14567f |
|
@ -8,5 +8,5 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
'chromium_checkout': 'refs/tags/125.0.6422.26',
|
'chromium_checkout': 'refs/tags/125.0.6422.26',
|
||||||
'depot_tools_checkout': '4246ba023a'
|
'depot_tools_checkout': '19199514e8'
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ class ClientBrowserDelegate : public ClientAppBrowser::Delegate {
|
||||||
const CefString& current_directory) override {
|
const CefString& current_directory) override {
|
||||||
// Add logging for some common switches that the user may attempt to use.
|
// Add logging for some common switches that the user may attempt to use.
|
||||||
static const char* kIgnoredSwitches[] = {
|
static const char* kIgnoredSwitches[] = {
|
||||||
|
switches::kDisableChromeRuntime,
|
||||||
switches::kEnableChromeRuntime,
|
switches::kEnableChromeRuntime,
|
||||||
switches::kMultiThreadedMessageLoop,
|
switches::kMultiThreadedMessageLoop,
|
||||||
switches::kOffScreenRenderingEnabled,
|
switches::kOffScreenRenderingEnabled,
|
||||||
|
|
|
@ -78,7 +78,7 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
|
||||||
|
|
||||||
// Enable Chrome runtime bootstrap. See issue #2969 for details.
|
// Enable Chrome runtime bootstrap. See issue #2969 for details.
|
||||||
use_chrome_bootstrap_ =
|
use_chrome_bootstrap_ =
|
||||||
command_line_->HasSwitch(switches::kEnableChromeRuntime);
|
!command_line_->HasSwitch(switches::kDisableChromeRuntime);
|
||||||
|
|
||||||
// Whether the Views framework will be used.
|
// Whether the Views framework will be used.
|
||||||
use_views_ = command_line_->HasSwitch(switches::kUseViews);
|
use_views_ = command_line_->HasSwitch(switches::kUseViews);
|
||||||
|
|
|
@ -58,13 +58,11 @@ int main(int argc, char* argv[]) {
|
||||||
// Specify CEF global settings here.
|
// Specify CEF global settings here.
|
||||||
CefSettings settings;
|
CefSettings settings;
|
||||||
|
|
||||||
// Use the CEF Chrome runtime if "--enable-chrome-runtime" is specified via
|
// Use the CEF Chrome bootstrap unless "--disable-chrome-runtime" is specified
|
||||||
// the command-line. Otherwise, use the CEF Alloy runtime. For more
|
// via the command-line. Otherwise, use the CEF Alloy bootstrap. The Alloy
|
||||||
// information about CEF runtimes see
|
// bootstrap is deprecated and will be removed in ~M127. See
|
||||||
// https://bitbucket.org/chromiumembedded/cef/wiki/Architecture.md#markdown-header-cef3
|
// https://github.com/chromiumembedded/cef/issues/3685
|
||||||
if (command_line->HasSwitch("enable-chrome-runtime")) {
|
settings.chrome_runtime = !command_line->HasSwitch("disable-chrome-runtime");
|
||||||
settings.chrome_runtime = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// When generating projects with CMake the CEF_USE_SANDBOX value will be defined
|
// When generating projects with CMake the CEF_USE_SANDBOX value will be defined
|
||||||
// automatically. Pass -DUSE_SANDBOX=OFF to the CMake command-line to disable
|
// automatically. Pass -DUSE_SANDBOX=OFF to the CMake command-line to disable
|
||||||
|
|
|
@ -150,13 +150,12 @@ int main(int argc, char* argv[]) {
|
||||||
// Specify CEF global settings here.
|
// Specify CEF global settings here.
|
||||||
CefSettings settings;
|
CefSettings settings;
|
||||||
|
|
||||||
// Use the CEF Chrome runtime if "--enable-chrome-runtime" is specified via
|
// Use the CEF Chrome bootstrap unless "--disable-chrome-runtime" is
|
||||||
// the command-line. Otherwise, use the CEF Alloy runtime. For more
|
// specified via the command-line. Otherwise, use the CEF Alloy bootstrap.
|
||||||
// information about CEF runtimes see
|
// The Alloy bootstrap is deprecated and will be removed in ~M127. See
|
||||||
// https://bitbucket.org/chromiumembedded/cef/wiki/Architecture.md#markdown-header-cef3
|
// https://github.com/chromiumembedded/cef/issues/3685
|
||||||
if (command_line->HasSwitch("enable-chrome-runtime")) {
|
settings.chrome_runtime =
|
||||||
settings.chrome_runtime = true;
|
!command_line->HasSwitch("disable-chrome-runtime");
|
||||||
}
|
|
||||||
|
|
||||||
// When generating projects with CMake the CEF_USE_SANDBOX value will be
|
// When generating projects with CMake the CEF_USE_SANDBOX value will be
|
||||||
// defined automatically. Pass -DUSE_SANDBOX=OFF to the CMake command-line
|
// defined automatically. Pass -DUSE_SANDBOX=OFF to the CMake command-line
|
||||||
|
|
|
@ -74,13 +74,11 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
|
||||||
// Specify CEF global settings here.
|
// Specify CEF global settings here.
|
||||||
CefSettings settings;
|
CefSettings settings;
|
||||||
|
|
||||||
// Use the CEF Chrome runtime if "--enable-chrome-runtime" is specified via
|
// Use the CEF Chrome bootstrap unless "--disable-chrome-runtime" is specified
|
||||||
// the command-line. Otherwise, use the CEF Alloy runtime. For more
|
// via the command-line. Otherwise, use the CEF Alloy bootstrap. The Alloy
|
||||||
// information about CEF runtimes see
|
// bootstrap is deprecated and will be removed in ~M127. See
|
||||||
// https://bitbucket.org/chromiumembedded/cef/wiki/Architecture.md#markdown-header-cef3
|
// https://github.com/chromiumembedded/cef/issues/3685
|
||||||
if (command_line->HasSwitch("enable-chrome-runtime")) {
|
settings.chrome_runtime = !command_line->HasSwitch("disable-chrome-runtime");
|
||||||
settings.chrome_runtime = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(CEF_USE_SANDBOX)
|
#if !defined(CEF_USE_SANDBOX)
|
||||||
settings.no_sandbox = true;
|
settings.no_sandbox = true;
|
||||||
|
|
|
@ -113,11 +113,14 @@ void SimpleApp::OnContextInitialized() {
|
||||||
CefRefPtr<CefCommandLine> command_line =
|
CefRefPtr<CefCommandLine> command_line =
|
||||||
CefCommandLine::GetGlobalCommandLine();
|
CefCommandLine::GetGlobalCommandLine();
|
||||||
|
|
||||||
|
const bool enable_chrome_runtime =
|
||||||
|
!command_line->HasSwitch("disable-chrome-runtime");
|
||||||
|
|
||||||
// Check if Alloy style will be used. Alloy style is always used with the
|
// Check if Alloy style will be used. Alloy style is always used with the
|
||||||
// Alloy runtime bootstrap and optional with the Chrome runtime bootstrap.
|
// Alloy runtime bootstrap and optional with the Chrome runtime bootstrap.
|
||||||
bool use_alloy_style = true;
|
bool use_alloy_style = true;
|
||||||
cef_runtime_style_t runtime_style = CEF_RUNTIME_STYLE_DEFAULT;
|
cef_runtime_style_t runtime_style = CEF_RUNTIME_STYLE_DEFAULT;
|
||||||
if (command_line->HasSwitch("enable-chrome-runtime")) {
|
if (enable_chrome_runtime) {
|
||||||
use_alloy_style = command_line->HasSwitch("use-alloy-style");
|
use_alloy_style = command_line->HasSwitch("use-alloy-style");
|
||||||
if (use_alloy_style) {
|
if (use_alloy_style) {
|
||||||
runtime_style = CEF_RUNTIME_STYLE_ALLOY;
|
runtime_style = CEF_RUNTIME_STYLE_ALLOY;
|
||||||
|
@ -139,10 +142,16 @@ void SimpleApp::OnContextInitialized() {
|
||||||
url = "http://www.google.com";
|
url = "http://www.google.com";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the browser using the Views framework if "--use-views" is specified
|
// Views is enabled by default with the Chrome bootstrap (add `--use-native`
|
||||||
// via the command-line. Otherwise, create the browser using the native
|
// to disable). Views is disabled by default with the Alloy bootstrap (add
|
||||||
// platform framework.
|
// `--use-views` to enable).
|
||||||
if (command_line->HasSwitch("use-views")) {
|
const bool use_views =
|
||||||
|
(enable_chrome_runtime && !command_line->HasSwitch("use-native")) ||
|
||||||
|
(!enable_chrome_runtime && command_line->HasSwitch("use-views"));
|
||||||
|
|
||||||
|
// If using Views create the browser using the Views framework, otherwise
|
||||||
|
// create the browser using the native platform framework.
|
||||||
|
if (use_views) {
|
||||||
// Create the BrowserView.
|
// Create the BrowserView.
|
||||||
CefRefPtr<CefBrowserView> browser_view = CefBrowserView::CreateBrowserView(
|
CefRefPtr<CefBrowserView> browser_view = CefBrowserView::CreateBrowserView(
|
||||||
handler, url, browser_settings, nullptr, nullptr,
|
handler, url, browser_settings, nullptr, nullptr,
|
||||||
|
|
|
@ -46,6 +46,7 @@ const char kCRLSetsPath[] = "crl-sets-path";
|
||||||
const char kLoadExtension[] = "load-extension";
|
const char kLoadExtension[] = "load-extension";
|
||||||
const char kNoActivate[] = "no-activate";
|
const char kNoActivate[] = "no-activate";
|
||||||
const char kEnableChromeRuntime[] = "enable-chrome-runtime";
|
const char kEnableChromeRuntime[] = "enable-chrome-runtime";
|
||||||
|
const char kDisableChromeRuntime[] = "disable-chrome-runtime";
|
||||||
const char kShowChromeToolbar[] = "show-chrome-toolbar";
|
const char kShowChromeToolbar[] = "show-chrome-toolbar";
|
||||||
const char kInitialShowState[] = "initial-show-state";
|
const char kInitialShowState[] = "initial-show-state";
|
||||||
const char kUseDefaultPopup[] = "use-default-popup";
|
const char kUseDefaultPopup[] = "use-default-popup";
|
||||||
|
|
|
@ -40,6 +40,7 @@ extern const char kCRLSetsPath[];
|
||||||
extern const char kLoadExtension[];
|
extern const char kLoadExtension[];
|
||||||
extern const char kNoActivate[];
|
extern const char kNoActivate[];
|
||||||
extern const char kEnableChromeRuntime[];
|
extern const char kEnableChromeRuntime[];
|
||||||
|
extern const char kDisableChromeRuntime[];
|
||||||
extern const char kShowChromeToolbar[];
|
extern const char kShowChromeToolbar[];
|
||||||
extern const char kInitialShowState[];
|
extern const char kInitialShowState[];
|
||||||
extern const char kUseDefaultPopup[];
|
extern const char kUseDefaultPopup[];
|
||||||
|
|
Loading…
Reference in New Issue