| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
| 6 | 6 |
| 7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 browser::NavigateParams params(browser, tabs[i].url, | 1053 browser::NavigateParams params(browser, tabs[i].url, |
| 1054 PageTransition::START_PAGE); | 1054 PageTransition::START_PAGE); |
| 1055 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; | 1055 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; |
| 1056 params.tabstrip_index = index; | 1056 params.tabstrip_index = index; |
| 1057 params.tabstrip_add_types = add_types; | 1057 params.tabstrip_add_types = add_types; |
| 1058 params.extension_app_id = tabs[i].app_id; | 1058 params.extension_app_id = tabs[i].app_id; |
| 1059 browser::Navigate(¶ms); | 1059 browser::Navigate(¶ms); |
| 1060 | 1060 |
| 1061 first_tab = false; | 1061 first_tab = false; |
| 1062 } | 1062 } |
| 1063 browser->window()->Show(); | 1063 browser->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL); |
| 1064 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial | 1064 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial |
| 1065 // focus explicitly. | 1065 // focus explicitly. |
| 1066 browser->GetSelectedTabContents()->view()->SetInitialFocus(); | 1066 browser->GetSelectedTabContents()->view()->SetInitialFocus(); |
| 1067 | 1067 |
| 1068 return browser; | 1068 return browser; |
| 1069 } | 1069 } |
| 1070 | 1070 |
| 1071 void BrowserInit::LaunchWithProfile::AddInfoBarsIfNecessary(Browser* browser) { | 1071 void BrowserInit::LaunchWithProfile::AddInfoBarsIfNecessary(Browser* browser) { |
| 1072 if (!browser || !profile_ || browser->tab_count() == 0) | 1072 if (!browser || !profile_ || browser->tab_count() == 0) |
| 1073 return; | 1073 return; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 return false; | 1478 return false; |
| 1479 automation->SetExpectedTabCount(expected_tabs); | 1479 automation->SetExpectedTabCount(expected_tabs); |
| 1480 | 1480 |
| 1481 AutomationProviderList* list = | 1481 AutomationProviderList* list = |
| 1482 g_browser_process->InitAutomationProviderList(); | 1482 g_browser_process->InitAutomationProviderList(); |
| 1483 DCHECK(list); | 1483 DCHECK(list); |
| 1484 list->AddProvider(automation); | 1484 list->AddProvider(automation); |
| 1485 | 1485 |
| 1486 return true; | 1486 return true; |
| 1487 } | 1487 } |
| OLD | NEW |