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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 10696093: Hide the main window when Set-As-Default dialog is present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed owner's remarks. Created 8 years, 4 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/ui/startup/startup_browser_creator_impl.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index adcb2f366181de34fb85c5084bf6f867a1759888..e304a682999191831a9afba2a775d4a3bbb5f067 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -781,10 +781,16 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser(Browser* browser,
chrome::ActivateTabAt(browser, 0, false);
}
- browser->window()->Show();
- // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
- // focus explicitly.
- chrome::GetActiveWebContents(browser)->GetView()->SetInitialFocus();
+ // The default behaviour is to show the window, as expressed by the default
+ // value of StartupBrowserCreated::show_main_browser_window_. If this was set
+ // to true ahead of this place, it means another task must have been spawned
+ // to take care of that.
+ if (!browser_creator_ || browser_creator_->show_main_browser_window()) {
+ browser->window()->Show();
+ // TODO(jcampan): http://crbug.com/8123 we should not need to set the
+ // initial focus explicitly.
+ chrome::GetActiveWebContents(browser)->GetView()->SetInitialFocus();
+ }
return browser;
}

Powered by Google App Engine
This is Rietveld 408576698