Chromium Code Reviews| 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; |
| } |