Delete Alloy bootstrap (fixes #3685)

This commit is contained in:
Marshall Greenblatt
2024-06-25 20:12:37 -04:00
parent b95b3e6fd5
commit a461a89728
282 changed files with 360 additions and 22399 deletions

View File

@ -76,12 +76,6 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
windowless_frame_rate_ = shared_texture_enabled_ ? 60 : 30;
}
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
// Enable Chrome runtime bootstrap. See issue #2969 for details.
use_chrome_bootstrap_ =
!command_line_->HasSwitch(switches::kDisableChromeRuntime);
#endif
// Whether the Views framework will be used.
use_views_ = command_line_->HasSwitch(switches::kUseViews);
@ -92,22 +86,15 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
}
// Whether Alloy style will be used.
use_alloy_style_ =
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
!use_chrome_bootstrap_ ||
#endif
command_line_->HasSwitch(switches::kUseAlloyStyle);
use_alloy_style_ = command_line_->HasSwitch(switches::kUseAlloyStyle);
if (use_windowless_rendering_ && !use_alloy_style_) {
LOG(WARNING) << "Windowless rendering requires Alloy style.";
use_alloy_style_ = true;
}
// Whether to use a native parent window with Chrome runtime.
// Whether to use a native parent window.
const bool use_chrome_native_parent =
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
use_chrome_bootstrap_ &&
#endif
command_line->HasSwitch(switches::kUseNative);
#if defined(OS_MAC)
@ -118,11 +105,7 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
}
#endif
if (
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
use_chrome_bootstrap_ &&
#endif
!use_views_ && !use_chrome_native_parent && !use_windowless_rendering_) {
if (!use_views_ && !use_chrome_native_parent && !use_windowless_rendering_) {
LOG(WARNING) << "Chrome runtime defaults to the Views framework.";
use_views_ = true;
}
@ -144,12 +127,9 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
}
// Log the current configuration.
LOG(WARNING) << "Using "
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
<< (use_chrome_bootstrap_ ? "Chrome" : "Alloy") << " bootstrap; "
#endif
<< (use_alloy_style_ ? "Alloy" : "Chrome") << " style; "
<< (use_views_ ? "Views" : "Native") << "-hosted window; "
LOG(WARNING) << "Using " << (use_alloy_style_ ? "Alloy" : "Chrome")
<< " style; " << (use_views_ ? "Views" : "Native")
<< "-hosted window; "
<< (use_windowless_rendering_ ? "Windowless" : "Windowed")
<< " rendering (not a warning)";
}
@ -188,12 +168,6 @@ cef_color_t MainContextImpl::GetBackgroundColor() {
return background_color_;
}
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
bool MainContextImpl::UseChromeBootstrap() {
return use_chrome_bootstrap_;
}
#endif
bool MainContextImpl::UseViewsGlobal() {
return use_views_;
}
@ -214,12 +188,6 @@ bool MainContextImpl::UseDefaultPopup() {
void MainContextImpl::PopulateSettings(CefSettings* settings) {
client::ClientAppBrowser::PopulateSettings(command_line_, *settings);
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
if (use_chrome_bootstrap_) {
settings->chrome_runtime = true;
}
#endif
CefString(&settings->cache_path) =
command_line_->GetSwitchValue(switches::kCachePath);
@ -262,11 +230,7 @@ void MainContextImpl::PopulateBrowserSettings(CefBrowserSettings* settings) {
settings->background_color = browser_background_color_;
}
if (
#if !defined(DISABLE_ALLOY_BOOTSTRAP)
use_chrome_bootstrap_ &&
#endif
command_line_->HasSwitch(switches::kHideChromeBubbles)) {
if (command_line_->HasSwitch(switches::kHideChromeBubbles)) {
settings->chrome_status_bubble = STATE_DISABLED;
settings->chrome_zoom_bubble = STATE_DISABLED;
}