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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 params.tabstrip_index = index; | 1203 params.tabstrip_index = index; |
1204 params.tabstrip_add_types = add_types; | 1204 params.tabstrip_add_types = add_types; |
1205 params.extension_app_id = tabs[i].app_id; | 1205 params.extension_app_id = tabs[i].app_id; |
1206 browser::Navigate(¶ms); | 1206 browser::Navigate(¶ms); |
1207 | 1207 |
1208 first_tab = false; | 1208 first_tab = false; |
1209 } | 1209 } |
1210 browser->window()->Show(); | 1210 browser->window()->Show(); |
1211 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial | 1211 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial |
1212 // focus explicitly. | 1212 // focus explicitly. |
1213 browser->GetSelectedTabContents()->GetView()->SetInitialFocus(); | 1213 browser->GetSelectedWebContents()->GetView()->SetInitialFocus(); |
1214 | 1214 |
1215 return browser; | 1215 return browser; |
1216 } | 1216 } |
1217 | 1217 |
1218 void BrowserInit::LaunchWithProfile::AddInfoBarsIfNecessary(Browser* browser) { | 1218 void BrowserInit::LaunchWithProfile::AddInfoBarsIfNecessary(Browser* browser) { |
1219 if (!browser || !profile_ || browser->tab_count() == 0) | 1219 if (!browser || !profile_ || browser->tab_count() == 0) |
1220 return; | 1220 return; |
1221 | 1221 |
1222 TabContentsWrapper* tab_contents = browser->GetSelectedTabContentsWrapper(); | 1222 TabContentsWrapper* tab_contents = browser->GetSelectedTabContentsWrapper(); |
1223 AddCrashedInfoBarIfNecessary(browser, tab_contents); | 1223 AddCrashedInfoBarIfNecessary(browser, tab_contents); |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1719 | 1719 |
1720 Profile* profile = ProfileManager::GetLastUsedProfile(); | 1720 Profile* profile = ProfileManager::GetLastUsedProfile(); |
1721 if (!profile) { | 1721 if (!profile) { |
1722 // We should only be able to get here if the profile already exists and | 1722 // We should only be able to get here if the profile already exists and |
1723 // has been created. | 1723 // has been created. |
1724 NOTREACHED(); | 1724 NOTREACHED(); |
1725 return; | 1725 return; |
1726 } | 1726 } |
1727 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, NULL, NULL); | 1727 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, NULL, NULL); |
1728 } | 1728 } |
OLD | NEW |