| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser_init.h" | 5 #include "chrome/browser/browser_init.h" |
| 6 | 6 |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 Browser* BrowserInit::LaunchWithProfile::OpenURLsInBrowser( | 535 Browser* BrowserInit::LaunchWithProfile::OpenURLsInBrowser( |
| 536 Browser* browser, | 536 Browser* browser, |
| 537 bool process_startup, | 537 bool process_startup, |
| 538 const std::vector<GURL>& urls) { | 538 const std::vector<GURL>& urls) { |
| 539 DCHECK(!urls.empty()); | 539 DCHECK(!urls.empty()); |
| 540 if (!browser || browser->GetType() != BrowserType::TABBED_BROWSER) | 540 if (!browser || browser->GetType() != BrowserType::TABBED_BROWSER) |
| 541 browser = CreateTabbedBrowser(); | 541 browser = CreateTabbedBrowser(); |
| 542 | 542 |
| 543 for (size_t i = 0; i < urls.size(); ++i) { | 543 for (size_t i = 0; i < urls.size(); ++i) { |
| 544 TabContents* tab = browser->AddTabWithURL( | 544 TabContents* tab = browser->AddTabWithURL( |
| 545 urls[i], PageTransition::START_PAGE, (i == 0), NULL); | 545 urls[i], GURL(), PageTransition::START_PAGE, (i == 0), NULL); |
| 546 if (i == 0 && process_startup) | 546 if (i == 0 && process_startup) |
| 547 AddCrashedInfoBarIfNecessary(tab); | 547 AddCrashedInfoBarIfNecessary(tab); |
| 548 } | 548 } |
| 549 browser->Show(); | 549 browser->Show(); |
| 550 return browser; | 550 return browser; |
| 551 } | 551 } |
| 552 | 552 |
| 553 void BrowserInit::LaunchWithProfile::AddCrashedInfoBarIfNecessary( | 553 void BrowserInit::LaunchWithProfile::AddCrashedInfoBarIfNecessary( |
| 554 TabContents* tab) { | 554 TabContents* tab) { |
| 555 WebContents* web_contents = tab->AsWebContents(); | 555 WebContents* web_contents = tab->AsWebContents(); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 new AutomationProviderClass(profile); | 713 new AutomationProviderClass(profile); |
| 714 automation->ConnectToChannel(channel_id); | 714 automation->ConnectToChannel(channel_id); |
| 715 automation->SetExpectedTabCount(expected_tabs); | 715 automation->SetExpectedTabCount(expected_tabs); |
| 716 | 716 |
| 717 AutomationProviderList* list = | 717 AutomationProviderList* list = |
| 718 g_browser_process->InitAutomationProviderList(); | 718 g_browser_process->InitAutomationProviderList(); |
| 719 DCHECK(list); | 719 DCHECK(list); |
| 720 list->AddProvider(automation); | 720 list->AddProvider(automation); |
| 721 } | 721 } |
| 722 | 722 |
| OLD | NEW |