mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 91.0.4472.0 (#870763)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
index 5c903a13a14e..d385c6c0c95c 100644
|
||||
index 5c903a13a14ed..d385c6c0c95c4 100644
|
||||
--- chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -27,13 +27,13 @@ index 5c903a13a14e..d385c6c0c95c 100644
|
||||
auto* browser_context = web_contents->GetBrowserContext();
|
||||
|
||||
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
|
||||
index b4878f7497df..8a87d04740b7 100644
|
||||
index 231a3b6c8ce1d..14776d981f506 100644
|
||||
--- extensions/browser/extension_host.cc
|
||||
+++ extensions/browser/extension_host.cc
|
||||
@@ -61,11 +61,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
DCHECK(host_type == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
|
||||
host_type == VIEW_TYPE_EXTENSION_DIALOG ||
|
||||
host_type == VIEW_TYPE_EXTENSION_POPUP);
|
||||
@@ -63,11 +63,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
DCHECK(host_type == mojom::ViewType::kExtensionBackgroundPage ||
|
||||
host_type == mojom::ViewType::kExtensionDialog ||
|
||||
host_type == mojom::ViewType::kExtensionPopup);
|
||||
- host_contents_ = WebContents::Create(
|
||||
+ host_contents_owned_ = WebContents::Create(
|
||||
WebContents::CreateParams(browser_context_, site_instance)),
|
||||
@ -46,7 +46,7 @@ index b4878f7497df..8a87d04740b7 100644
|
||||
main_frame_host_ = host_contents_->GetMainFrame();
|
||||
|
||||
// Listen for when an extension is unloaded from the same profile, as it may
|
||||
@@ -79,6 +80,44 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
@@ -81,6 +82,44 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
dispatcher()->set_delegate(this);
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ index b4878f7497df..8a87d04740b7 100644
|
||||
+ content::BrowserContext* browser_context,
|
||||
+ content::WebContents* host_contents,
|
||||
+ const GURL& url,
|
||||
+ ViewType host_type)
|
||||
+ mojom::ViewType host_type)
|
||||
+ : delegate_(delegate),
|
||||
+ extension_(extension),
|
||||
+ extension_id_(extension->id()),
|
||||
@ -68,9 +68,9 @@ index b4878f7497df..8a87d04740b7 100644
|
||||
+ DCHECK(host_contents);
|
||||
+
|
||||
+ // Not used for panels, see PanelHost.
|
||||
+ DCHECK(host_type == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
|
||||
+ host_type == VIEW_TYPE_EXTENSION_DIALOG ||
|
||||
+ host_type == VIEW_TYPE_EXTENSION_POPUP);
|
||||
+ DCHECK(host_type == mojom::ViewType::kExtensionBackgroundPage ||
|
||||
+ host_type == mojom::ViewType::kExtensionDialog ||
|
||||
+ host_type == mojom::ViewType::kExtensionPopup);
|
||||
+
|
||||
+ content::WebContentsObserver::Observe(host_contents_);
|
||||
+ SetViewType(host_contents_, host_type);
|
||||
@ -92,19 +92,19 @@ index b4878f7497df..8a87d04740b7 100644
|
||||
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
|
||||
|
||||
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
|
||||
index 59798a628937..2018abb8324b 100644
|
||||
index 305726557f2ea..caa4b798a013e 100644
|
||||
--- extensions/browser/extension_host.h
|
||||
+++ extensions/browser/extension_host.h
|
||||
@@ -52,13 +52,19 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
ExtensionHost(const Extension* extension,
|
||||
@@ -53,13 +53,19 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
content::SiteInstance* site_instance,
|
||||
const GURL& url, ViewType host_type);
|
||||
const GURL& url,
|
||||
mojom::ViewType host_type);
|
||||
+ ExtensionHost(ExtensionHostDelegate* delegate,
|
||||
+ const Extension* extension,
|
||||
+ content::BrowserContext* browser_context,
|
||||
+ content::WebContents* host_contents,
|
||||
+ const GURL& url,
|
||||
+ ViewType host_type);
|
||||
+ mojom::ViewType host_type);
|
||||
~ExtensionHost() override;
|
||||
|
||||
// This may be null if the extension has been or is being unloaded.
|
||||
@ -116,7 +116,7 @@ index 59798a628937..2018abb8324b 100644
|
||||
content::RenderFrameHost* main_frame_host() const { return main_frame_host_; }
|
||||
content::RenderProcessHost* render_process_host() const;
|
||||
bool has_loaded_once() const { return has_loaded_once_; }
|
||||
@@ -180,7 +186,8 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
@@ -182,7 +188,8 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
content::BrowserContext* browser_context_;
|
||||
|
||||
// The host for our HTML content.
|
||||
@ -127,7 +127,7 @@ index 59798a628937..2018abb8324b 100644
|
||||
// A pointer to the current or speculative main frame in `host_contents_`. We
|
||||
// can't access this frame through the `host_contents_` directly as it does
|
||||
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
|
||||
index c2d194ec21be..3a7354f648ed 100644
|
||||
index 7eb3d073c7b79..3844a9c6033a5 100644
|
||||
--- extensions/browser/extensions_browser_client.h
|
||||
+++ extensions/browser/extensions_browser_client.h
|
||||
@@ -27,6 +27,7 @@
|
||||
@ -162,16 +162,14 @@ index c2d194ec21be..3a7354f648ed 100644
|
||||
// once each time the extensions system is loaded per browser_context. The
|
||||
// implementation may wish to use the BrowserContext to record the current
|
||||
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
|
||||
index 2bc2248ba920..583419786f28 100644
|
||||
index 26bff09c646be..830ff12c5fc9c 100644
|
||||
--- extensions/browser/process_manager.cc
|
||||
+++ extensions/browser/process_manager.cc
|
||||
@@ -389,9 +389,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
@@ -392,9 +392,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
return true; // TODO(kalman): return false here? It might break things...
|
||||
|
||||
DVLOG(1) << "CreateBackgroundHost " << extension->id();
|
||||
- ExtensionHost* host =
|
||||
- new ExtensionHost(extension, GetSiteInstanceForURL(url).get(), url,
|
||||
- VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
|
||||
+ ExtensionHost* host = nullptr;
|
||||
+ if (ExtensionsBrowserClient::Get()->CreateBackgroundExtensionHost(
|
||||
+ extension, browser_context_, url, &host) && !host) {
|
||||
@ -179,8 +177,9 @@ index 2bc2248ba920..583419786f28 100644
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (!host) {
|
||||
+ host = new ExtensionHost(extension, GetSiteInstanceForURL(url).get(), url,
|
||||
+ VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
|
||||
+ host =
|
||||
new ExtensionHost(extension, GetSiteInstanceForURL(url).get(), url,
|
||||
mojom::ViewType::kExtensionBackgroundPage);
|
||||
+ }
|
||||
host->CreateRendererSoon();
|
||||
OnBackgroundHostCreated(host);
|
||||
|
Reference in New Issue
Block a user