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

@@ -121,8 +121,8 @@ Browser* ChromeBrowserDelegate::CreateDevToolsBrowser(
}
// Start with the same extra info as the opener, for consistency with
// current Alloy runtime behavior (see CefDevToolsFrontend::Show). This
// value, if non-empty, will be read-only.
// previous Alloy runtime behavior. This value, if non-empty, will be
// read-only.
create_params.extra_info = opener_browser_host->browser_info()->extra_info();
DCHECK(!create_params.extra_info || create_params.extra_info->IsReadOnly());
@@ -789,12 +789,6 @@ std::unique_ptr<BrowserDelegate> BrowserDelegate::Create(
Browser* browser,
scoped_refptr<CreateParams> cef_params,
const Browser* opener) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
if (!cef::IsChromeRuntimeEnabled()) {
return nullptr;
}
#endif
CefBrowserCreateParams create_params;
// Parameters from ChromeBrowserHostImpl::Create, or nullptr if the Browser

View File

@@ -13,7 +13,6 @@
#include "cef/libcef/browser/thread_util.h"
#include "cef/libcef/browser/views/browser_view_impl.h"
#include "cef/libcef/common/net/url_util.h"
#include "cef/libcef/features/runtime_checks.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_navigator.h"
@@ -67,45 +66,30 @@ CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::FromBaseChecked(
// static
CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::GetBrowserForHost(
const content::RenderViewHost* host) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
REQUIRE_CHROME_RUNTIME();
#endif
return FromBaseChecked(CefBrowserHostBase::GetBrowserForHost(host));
}
// static
CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::GetBrowserForHost(
const content::RenderFrameHost* host) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
REQUIRE_CHROME_RUNTIME();
#endif
return FromBaseChecked(CefBrowserHostBase::GetBrowserForHost(host));
}
// static
CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::GetBrowserForContents(
const content::WebContents* contents) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
REQUIRE_CHROME_RUNTIME();
#endif
return FromBaseChecked(CefBrowserHostBase::GetBrowserForContents(contents));
}
// static
CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::GetBrowserForGlobalId(
const content::GlobalRenderFrameHostId& global_id) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
REQUIRE_CHROME_RUNTIME();
#endif
return FromBaseChecked(CefBrowserHostBase::GetBrowserForGlobalId(global_id));
}
// static
CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::GetBrowserForBrowser(
const Browser* browser) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
REQUIRE_CHROME_RUNTIME();
#endif
// Return the ChromeBrowserHostImpl that is currently active.
// Views-hosted Browsers will contain a single ChromeBrowserHostImpl.
// Otherwise, there will be a ChromeBrowserHostImpl per Tab/WebContents.

View File

@@ -17,7 +17,7 @@
class ChromeBrowserDelegate;
class ChromeBrowserView;
// CefBrowser implementation for the chrome runtime. Method calls are delegated
// CefBrowser implementation for Chrome style. Method calls are delegated
// to the chrome Browser object or the WebContents as appropriate. See the
// ChromeBrowserDelegate documentation for additional details. All methods are
// thread-safe unless otherwise indicated.

View File

@@ -27,7 +27,6 @@
#include "cef/libcef/common/app_manager.h"
#include "cef/libcef/common/cef_switches.h"
#include "cef/libcef/common/command_line_impl.h"
#include "cef/libcef/features/features.h"
#include "chrome/browser/chrome_browser_main.h"
#include "chrome/browser/net/system_network_context_manager.h"
#include "chrome/browser/profiles/profile.h"
@@ -107,11 +106,6 @@ void ChromeContentBrowserClientCef::AppendExtraCommandLineSwitches(
ChromeContentBrowserClient::AppendExtraCommandLineSwitches(command_line,
child_process_id);
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
// Necessary to launch sub-processes in the correct mode.
command_line->AppendSwitch(switches::kEnableChromeRuntime);
#endif
// Necessary to populate DIR_USER_DATA in sub-processes.
// See resource_util.cc GetUserDataPath.
base::FilePath user_data_dir;

View File

@@ -96,7 +96,7 @@ class BrowserView;
class CefWindowView;
// Widget for a Views-hosted Chrome browser. Created in
// CefWindowView::CreateWidget() when the Chrome runtime is enabled.
// CefWindowView::CreateWidget() with Chrome style.
class ChromeBrowserFrame : public BrowserFrame,
public CefWidget,
public CefColorProviderTracker::Observer,