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

Unified Diff: chrome/browser/ui/browser_tabrestore.cc

Issue 227043004: Restored tabs should set their initial visibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DOMMessageQueue simplifications. 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_tabrestore_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_tabrestore.cc
diff --git a/chrome/browser/ui/browser_tabrestore.cc b/chrome/browser/ui/browser_tabrestore.cc
index f009090f548f26f6b0ddd580df931221607fb748..38a9a932c8572c9222ec344d388ca486ac67d844 100644
--- a/chrome/browser/ui/browser_tabrestore.cc
+++ b/chrome/browser/ui/browser_tabrestore.cc
@@ -44,7 +44,8 @@ WebContents* CreateRestoredTab(
const std::string& extension_app_id,
bool from_last_session,
content::SessionStorageNamespace* session_storage_namespace,
- const std::string& user_agent_override) {
+ const std::string& user_agent_override,
+ bool initially_hidden) {
GURL restore_url = navigations.at(selected_navigation).virtual_url();
// TODO(ajwong): Remove the temporary session_storage_namespace_map when
// we teach session restore to understand that one tab can have multiple
@@ -56,6 +57,7 @@ WebContents* CreateRestoredTab(
WebContents::CreateParams create_params(
browser->profile(),
tab_util::GetSiteInstanceForNewTab(browser->profile(), restore_url));
+ create_params.initially_hidden = initially_hidden;
WebContents* base_web_contents =
browser->tab_strip_model()->GetActiveWebContents();
if (base_web_contents) {
@@ -99,7 +101,8 @@ content::WebContents* AddRestoredTab(
extension_app_id,
from_last_session,
session_storage_namespace,
- user_agent_override);
+ user_agent_override,
+ !select);
int add_types = select ? TabStripModel::ADD_ACTIVE
: TabStripModel::ADD_NONE;
@@ -145,7 +148,8 @@ content::WebContents* ReplaceRestoredTab(
extension_app_id,
from_last_session,
session_storage_namespace,
- user_agent_override);
+ user_agent_override,
+ false);
// ReplaceWebContentsAt won't animate in the restoration, so manually do the
// equivalent of ReplaceWebContentsAt.
« no previous file with comments | « no previous file | chrome/browser/ui/browser_tabrestore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698