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

Unified Diff: chrome/browser/tab_contents/background_contents.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: chrome/browser/tab_contents/background_contents.cc
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index 9420402e6614422bbd1554fc05fd12a153e800c5..ad0ce6281bc403d8b26b2f7ae2faacaa83a44a11 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -33,6 +33,7 @@ BackgroundContents::BackgroundContents(
site_instance->GetBrowserContext());
WebContents::CreateParams create_params(profile_, site_instance);
+ create_params.initially_hidden = true;
create_params.routing_id = routing_id;
if (session_storage_namespace) {
content::SessionStorageNamespaceMap session_storage_namespace_map;
@@ -123,6 +124,13 @@ void BackgroundContents::AddNewContents(WebContents* source,
new_contents, disposition, initial_pos, user_gesture, was_blocked);
}
+bool BackgroundContents::IsWebContentsNeverVisible(
+ content::WebContents* web_contents) {
+ DCHECK_EQ(extensions::VIEW_TYPE_BACKGROUND_CONTENTS,
+ extensions::GetViewType(web_contents));
jam 2014/04/14 22:43:01 this seems like a redundant dcheck. i would prefer
danakj 2014/04/14 22:47:30 To me it's not so much about trust but to document
+ return true;
+}
+
void BackgroundContents::RenderProcessGone(base::TerminationStatus status) {
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED,

Powered by Google App Engine
This is Rietveld 408576698