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 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 23 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
24 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 24 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
25 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" | 25 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" |
26 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 26 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
27 #include "chrome/browser/chromeos/audio/audio_handler.h" | 27 #include "chrome/browser/chromeos/audio/audio_handler.h" |
28 #include "chrome/browser/chromeos/boot_times_loader.h" | 28 #include "chrome/browser/chromeos/boot_times_loader.h" |
29 #include "chrome/browser/chromeos/contacts/contact_manager.h" | 29 #include "chrome/browser/chromeos/contacts/contact_manager.h" |
30 #include "chrome/browser/chromeos/cros/cros_library.h" | 30 #include "chrome/browser/chromeos/cros/cros_library.h" |
31 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" | 31 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" |
| 32 #include "chrome/browser/chromeos/display/display_configuration_observer.h" |
32 #include "chrome/browser/chromeos/display/display_preferences.h" | 33 #include "chrome/browser/chromeos/display/display_preferences.h" |
33 #include "chrome/browser/chromeos/display/primary_display_switch_observer.h" | |
34 #include "chrome/browser/chromeos/extensions/default_app_order.h" | 34 #include "chrome/browser/chromeos/extensions/default_app_order.h" |
35 #include "chrome/browser/chromeos/external_metrics.h" | 35 #include "chrome/browser/chromeos/external_metrics.h" |
36 #include "chrome/browser/chromeos/imageburner/burn_manager.h" | 36 #include "chrome/browser/chromeos/imageburner/burn_manager.h" |
37 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 37 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
38 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 38 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
39 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 39 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
40 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" | 40 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" |
41 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" | 41 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" |
42 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 42 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
43 #include "chrome/browser/chromeos/login/authenticator.h" | 43 #include "chrome/browser/chromeos/login/authenticator.h" |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 // portal detector starts to listen for notifications from | 623 // portal detector starts to listen for notifications from |
624 // NetworkLibrary about changes in the NetworkManager and initiates | 624 // NetworkLibrary about changes in the NetworkManager and initiates |
625 // captive portal detection for active networks. | 625 // captive portal detection for active networks. |
626 if (NetworkPortalDetector::IsEnabled() && | 626 if (NetworkPortalDetector::IsEnabled() && |
627 NetworkPortalDetector::GetInstance()) { | 627 NetworkPortalDetector::GetInstance()) { |
628 NetworkPortalDetector::GetInstance()->Init(); | 628 NetworkPortalDetector::GetInstance()->Init(); |
629 } | 629 } |
630 | 630 |
631 NotifyDisplayLocalStatePrefChanged(); | 631 NotifyDisplayLocalStatePrefChanged(); |
632 | 632 |
633 primary_display_switch_observer_.reset( | 633 display_configuration_observer_.reset( |
634 new PrimaryDisplaySwitchObserver()); | 634 new DisplayConfigurationObserver()); |
635 | 635 |
636 ChromeBrowserMainPartsLinux::PostProfileInit(); | 636 ChromeBrowserMainPartsLinux::PostProfileInit(); |
637 } | 637 } |
638 | 638 |
639 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 639 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
640 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 640 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
641 // -- just before MetricsService::LogNeedForCleanShutdown(). | 641 // -- just before MetricsService::LogNeedForCleanShutdown(). |
642 | 642 |
643 g_browser_process->metrics_service()->StartExternalMetrics(); | 643 g_browser_process->metrics_service()->StartExternalMetrics(); |
644 | 644 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 SystemKeyEventListener::Shutdown(); | 720 SystemKeyEventListener::Shutdown(); |
721 imageburner::BurnManager::Shutdown(); | 721 imageburner::BurnManager::Shutdown(); |
722 AudioHandler::Shutdown(); | 722 AudioHandler::Shutdown(); |
723 | 723 |
724 WebSocketProxyController::Shutdown(); | 724 WebSocketProxyController::Shutdown(); |
725 | 725 |
726 // Let classes unregister themselves as observers of the ash::Shell singleton | 726 // Let classes unregister themselves as observers of the ash::Shell singleton |
727 // before the shell is destroyed. | 727 // before the shell is destroyed. |
728 user_activity_notifier_.reset(); | 728 user_activity_notifier_.reset(); |
729 video_activity_notifier_.reset(); | 729 video_activity_notifier_.reset(); |
730 primary_display_switch_observer_.reset(); | 730 display_configuration_observer_.reset(); |
731 | 731 |
732 // Detach D-Bus clients before DBusThreadManager is shut down. | 732 // Detach D-Bus clients before DBusThreadManager is shut down. |
733 power_button_observer_.reset(); | 733 power_button_observer_.reset(); |
734 screen_dimming_observer_.reset(); | 734 screen_dimming_observer_.reset(); |
735 screensaver_controller_.reset(); | 735 screensaver_controller_.reset(); |
736 | 736 |
737 // Delete ContactManager while |g_browser_process| is still alive. | 737 // Delete ContactManager while |g_browser_process| is still alive. |
738 contact_manager_.reset(); | 738 contact_manager_.reset(); |
739 | 739 |
740 chromeos::MagnificationManager::Shutdown(); | 740 chromeos::MagnificationManager::Shutdown(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 return; | 849 return; |
850 | 850 |
851 // If failed to launch, go back to login screen. | 851 // If failed to launch, go back to login screen. |
852 LOG(ERROR) << "Failed to launch kiosk app. Fall back to login screen"; | 852 LOG(ERROR) << "Failed to launch kiosk app. Fall back to login screen"; |
853 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); | 853 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); |
854 | 854 |
855 // TODO(xiyuan): Show error message. | 855 // TODO(xiyuan): Show error message. |
856 } | 856 } |
857 | 857 |
858 } // namespace chromeos | 858 } // namespace chromeos |
OLD | NEW |