| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 | 462 |
| 463 if (command_line.HasSwitch(switches::kRestoreBackgroundContents)) { | 463 if (command_line.HasSwitch(switches::kRestoreBackgroundContents)) { |
| 464 // Create status icons | 464 // Create status icons |
| 465 StatusTrayManager* tray = g_browser_process->status_tray_manager(); | 465 StatusTrayManager* tray = g_browser_process->status_tray_manager(); |
| 466 if (tray) | 466 if (tray) |
| 467 tray->Init(profile); | 467 tray->Init(profile); |
| 468 } | 468 } |
| 469 return true; | 469 return true; |
| 470 } | 470 } |
| 471 | 471 |
| 472 #if defined(OS_CHROMEOS) | |
| 473 bool BrowserInit::ApplyServicesCustomization( | |
| 474 const chromeos::ServicesCustomizationDocument* customization) { | |
| 475 GURL welcome_url(customization->initial_start_page_url()); | |
| 476 DCHECK(welcome_url.is_valid()) << welcome_url; | |
| 477 if (welcome_url.is_valid()) { | |
| 478 AddFirstRunTab(welcome_url); | |
| 479 } | |
| 480 // TODO(denisromanov): Add extensions and web apps customization here. | |
| 481 return true; | |
| 482 } | |
| 483 #endif | |
| 484 | |
| 485 // LaunchWithProfile ---------------------------------------------------------- | 472 // LaunchWithProfile ---------------------------------------------------------- |
| 486 | 473 |
| 487 BrowserInit::LaunchWithProfile::LaunchWithProfile( | 474 BrowserInit::LaunchWithProfile::LaunchWithProfile( |
| 488 const std::wstring& cur_dir, | 475 const std::wstring& cur_dir, |
| 489 const CommandLine& command_line) | 476 const CommandLine& command_line) |
| 490 : cur_dir_(cur_dir), | 477 : cur_dir_(cur_dir), |
| 491 command_line_(command_line), | 478 command_line_(command_line), |
| 492 profile_(NULL), | 479 profile_(NULL), |
| 493 browser_init_(NULL) { | 480 browser_init_(NULL) { |
| 494 } | 481 } |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 scoped_refptr<AutomationProviderClass> automation = | 1058 scoped_refptr<AutomationProviderClass> automation = |
| 1072 new AutomationProviderClass(profile); | 1059 new AutomationProviderClass(profile); |
| 1073 automation->ConnectToChannel(channel_id); | 1060 automation->ConnectToChannel(channel_id); |
| 1074 automation->SetExpectedTabCount(expected_tabs); | 1061 automation->SetExpectedTabCount(expected_tabs); |
| 1075 | 1062 |
| 1076 AutomationProviderList* list = | 1063 AutomationProviderList* list = |
| 1077 g_browser_process->InitAutomationProviderList(); | 1064 g_browser_process->InitAutomationProviderList(); |
| 1078 DCHECK(list); | 1065 DCHECK(list); |
| 1079 list->AddProvider(automation); | 1066 list->AddProvider(automation); |
| 1080 } | 1067 } |
| OLD | NEW |