OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 // Add observers for WallpaperManager. This depends on PowerManagerClient, | 538 // Add observers for WallpaperManager. This depends on PowerManagerClient, |
539 // TimezoneSettings and CrosSettings. | 539 // TimezoneSettings and CrosSettings. |
540 WallpaperManager::Get()->AddObservers(); | 540 WallpaperManager::Get()->AddObservers(); |
541 | 541 |
542 #if defined(USE_LINUX_BREAKPAD) | 542 #if defined(USE_LINUX_BREAKPAD) |
543 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, | 543 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, |
544 base::Bind(&ChromeOSVersionCallback), | 544 base::Bind(&ChromeOSVersionCallback), |
545 &tracker_); | 545 &tracker_); |
546 #endif | 546 #endif |
547 | 547 |
| 548 removable_device_notifications_ = |
| 549 new RemovableDeviceNotificationsCros(); |
| 550 |
548 // In Aura builds this will initialize ash::Shell. | 551 // In Aura builds this will initialize ash::Shell. |
549 ChromeBrowserMainPartsLinux::PreProfileInit(); | 552 ChromeBrowserMainPartsLinux::PreProfileInit(); |
550 } | 553 } |
551 | 554 |
552 void ChromeBrowserMainPartsChromeos::PostProfileInit() { | 555 void ChromeBrowserMainPartsChromeos::PostProfileInit() { |
553 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 556 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
554 // -- just after CreateProfile(). | 557 // -- just after CreateProfile(). |
555 | 558 |
556 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && | 559 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && |
557 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { | 560 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 switches::kEnableScreensaverExtensions)) { | 616 switches::kEnableScreensaverExtensions)) { |
614 screensaver_controller_.reset(new ScreensaverController()); | 617 screensaver_controller_.reset(new ScreensaverController()); |
615 } | 618 } |
616 suspend_observer_.reset(new SuspendObserver()); | 619 suspend_observer_.reset(new SuspendObserver()); |
617 if (KioskModeSettings::Get()->IsKioskModeEnabled()) { | 620 if (KioskModeSettings::Get()->IsKioskModeEnabled()) { |
618 power_state_override_ = new PowerStateOverride( | 621 power_state_override_ = new PowerStateOverride( |
619 PowerStateOverride::BLOCK_DISPLAY_SLEEP); | 622 PowerStateOverride::BLOCK_DISPLAY_SLEEP); |
620 } | 623 } |
621 chromeos::accessibility::Initialize(); | 624 chromeos::accessibility::Initialize(); |
622 | 625 |
623 removable_device_notifications_ = | 626 removable_device_notifications_->Init(); |
624 new RemovableDeviceNotificationsCros(); | |
625 | 627 |
626 // Initialize the network portal detector for Chrome OS. The network | 628 // Initialize the network portal detector for Chrome OS. The network |
627 // portal detector starts to listen for notifications from | 629 // portal detector starts to listen for notifications from |
628 // NetworkLibrary about changes in the NetworkManager and initiates | 630 // NetworkLibrary about changes in the NetworkManager and initiates |
629 // captive portal detection for active networks. | 631 // captive portal detection for active networks. |
630 if (NetworkPortalDetector::IsEnabled() && | 632 if (NetworkPortalDetector::IsEnabled() && |
631 NetworkPortalDetector::GetInstance()) { | 633 NetworkPortalDetector::GetInstance()) { |
632 NetworkPortalDetector::GetInstance()->Init(); | 634 NetworkPortalDetector::GetInstance()->Init(); |
633 } | 635 } |
634 | 636 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 if (success) | 854 if (success) |
853 return; | 855 return; |
854 | 856 |
855 // If failed to launch, go back to login screen. | 857 // If failed to launch, go back to login screen. |
856 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); | 858 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); |
857 | 859 |
858 // TODO(xiyuan): Show error message. | 860 // TODO(xiyuan): Show error message. |
859 } | 861 } |
860 | 862 |
861 } // namespace chromeos | 863 } // namespace chromeos |
OLD | NEW |