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, |