Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2610)

Unified Diff: extensions/browser/extension_host.cc

Issue 233093006: Stop disabling force_compositing_mode for background RenderViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: background: WebContentsDelegate Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/extension_host.cc
diff --git a/extensions/browser/extension_host.cc b/extensions/browser/extension_host.cc
index 0eac1fbbf30b12e227cdc6c143db6f2423bec3a5..f623a0c0d74455040b20d87ab8ae359b1c267862 100644
--- a/extensions/browser/extension_host.cc
+++ b/extensions/browser/extension_host.cc
@@ -130,8 +130,10 @@ ExtensionHost::ExtensionHost(const Extension* extension,
host_type == VIEW_TYPE_EXTENSION_DIALOG ||
host_type == VIEW_TYPE_EXTENSION_INFOBAR ||
host_type == VIEW_TYPE_EXTENSION_POPUP);
- host_contents_.reset(WebContents::Create(
- WebContents::CreateParams(browser_context_, site_instance))),
+ WebContents::CreateParams create_params(browser_context_, site_instance);
+ if (host_type == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE)
+ create_params.initially_hidden = true;
+ host_contents_.reset(WebContents::Create(create_params));
content::WebContentsObserver::Observe(host_contents_.get());
host_contents_->SetDelegate(this);
SetViewType(host_contents_.get(), host_type);
@@ -427,4 +429,10 @@ void ExtensionHost::RequestMediaAccessPermission(
web_contents, request, callback, extension());
}
+bool ExtensionHost::IsWebContentsNeverVisible(
+ content::WebContents* web_contents) {
+ ViewType view_type = extensions::GetViewType(web_contents);
+ return view_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE;
+}
+
} // namespace extensions
« content/public/browser/web_contents_delegate.h ('K') | « extensions/browser/extension_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698