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

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: Fixed a crash planted in the previous patch. Created 8 years, 5 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 1b9188f90671b28aff69ba53d45e451844ff9ed6..3efbeaaf517b317f1643abed6649ae3056125af0 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -718,10 +718,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();
+ // If we expect modal dialog to show, showing the browser has to be supressed
+ // for now. The start sequence will then take care of showing it.
+ bool as_first_run = is_first_run_ ||
grt (UTC plus 2) 2012/07/05 20:08:47 as discussed in person, i think it's cleaner to mo
motek. 2012/08/08 14:28:35 Moved to the creator, but as a simple setter/gette
+ command_line_.HasSwitch(switches::kFirstRun);
+ if (!chrome::ExpectDefaultBrowserPromptDialog(profile_, as_first_run)) {
+ 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