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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 25 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
26 #include "chrome/browser/chrome_notification_types.h" | 26 #include "chrome/browser/chrome_notification_types.h" |
27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
28 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 28 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
29 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" | 29 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
30 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 30 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
31 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification
.h" | 31 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification
.h" |
32 #include "chrome/browser/chromeos/boot_times_loader.h" | 32 #include "chrome/browser/chromeos/boot_times_loader.h" |
33 #include "chrome/browser/chromeos/contacts/contact_manager.h" | 33 #include "chrome/browser/chromeos/contacts/contact_manager.h" |
34 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" | 34 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" |
35 #include "chrome/browser/chromeos/event_rewriter.h" | |
36 #include "chrome/browser/chromeos/extensions/default_app_order.h" | 35 #include "chrome/browser/chromeos/extensions/default_app_order.h" |
37 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h" | 36 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h" |
38 #include "chrome/browser/chromeos/external_metrics.h" | 37 #include "chrome/browser/chromeos/external_metrics.h" |
39 #include "chrome/browser/chromeos/imageburner/burn_manager.h" | 38 #include "chrome/browser/chromeos/imageburner/burn_manager.h" |
40 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 39 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
41 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 40 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
42 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" | 41 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" |
43 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" | 42 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" |
44 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 43 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
45 #include "chrome/browser/chromeos/language_preferences.h" | 44 #include "chrome/browser/chromeos/language_preferences.h" |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 // Listen for XI_HierarchyChanged events. Note: if this is moved to | 695 // Listen for XI_HierarchyChanged events. Note: if this is moved to |
697 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown | 696 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown |
698 // reasons, see http://crosbug.com/24833. | 697 // reasons, see http://crosbug.com/24833. |
699 XInputHierarchyChangedEventListener::GetInstance(); | 698 XInputHierarchyChangedEventListener::GetInstance(); |
700 | 699 |
701 #if defined(USE_X11) | 700 #if defined(USE_X11) |
702 // Start the CrOS input device UMA watcher | 701 // Start the CrOS input device UMA watcher |
703 DeviceUMA::GetInstance(); | 702 DeviceUMA::GetInstance(); |
704 #endif | 703 #endif |
705 | 704 |
706 event_rewriter_.reset(new EventRewriter()); | |
707 | |
708 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 705 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
709 // -- immediately after ChildProcess::WaitForDebugger(). | 706 // -- immediately after ChildProcess::WaitForDebugger(). |
710 | 707 |
711 // Start the out-of-memory priority manager here so that we give the most | 708 // Start the out-of-memory priority manager here so that we give the most |
712 // amount of time for the other services to start up before we start | 709 // amount of time for the other services to start up before we start |
713 // adjusting the oom priority. | 710 // adjusting the oom priority. |
714 g_browser_process->platform_part()->oom_priority_manager()->Start(); | 711 g_browser_process->platform_part()->oom_priority_manager()->Start(); |
715 | 712 |
716 if (ui::ShouldDefaultToNaturalScroll()) { | 713 if (ui::ShouldDefaultToNaturalScroll()) { |
717 CommandLine::ForCurrentProcess()->AppendSwitch( | 714 CommandLine::ForCurrentProcess()->AppendSwitch( |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 // shutdown DeviceSettingsService yet, it might still be accessed by | 759 // shutdown DeviceSettingsService yet, it might still be accessed by |
763 // BrowserPolicyConnector (owned by g_browser_process). | 760 // BrowserPolicyConnector (owned by g_browser_process). |
764 DeviceSettingsService::Get()->UnsetSessionManager(); | 761 DeviceSettingsService::Get()->UnsetSessionManager(); |
765 | 762 |
766 // We should remove observers attached to D-Bus clients before | 763 // We should remove observers attached to D-Bus clients before |
767 // DBusThreadManager is shut down. | 764 // DBusThreadManager is shut down. |
768 extension_system_event_observer_.reset(); | 765 extension_system_event_observer_.reset(); |
769 retail_mode_power_save_blocker_.reset(); | 766 retail_mode_power_save_blocker_.reset(); |
770 peripheral_battery_observer_.reset(); | 767 peripheral_battery_observer_.reset(); |
771 power_prefs_.reset(); | 768 power_prefs_.reset(); |
772 event_rewriter_.reset(); | |
773 | 769 |
774 // The XInput2 event listener needs to be shut down earlier than when | 770 // The XInput2 event listener needs to be shut down earlier than when |
775 // Singletons are finally destroyed in AtExitManager. | 771 // Singletons are finally destroyed in AtExitManager. |
776 XInputHierarchyChangedEventListener::GetInstance()->Stop(); | 772 XInputHierarchyChangedEventListener::GetInstance()->Stop(); |
777 | 773 |
778 #if defined(USE_X11) | 774 #if defined(USE_X11) |
779 DeviceUMA::GetInstance()->Stop(); | 775 DeviceUMA::GetInstance()->Stop(); |
780 #endif | 776 #endif |
781 | 777 |
782 // SystemKeyEventListener::Shutdown() is always safe to call, | 778 // SystemKeyEventListener::Shutdown() is always safe to call, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 // Destroy DBus services immediately after threads are stopped. | 826 // Destroy DBus services immediately after threads are stopped. |
831 dbus_services_.reset(); | 827 dbus_services_.reset(); |
832 | 828 |
833 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 829 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
834 | 830 |
835 // Destroy DeviceSettingsService after g_browser_process. | 831 // Destroy DeviceSettingsService after g_browser_process. |
836 DeviceSettingsService::Shutdown(); | 832 DeviceSettingsService::Shutdown(); |
837 } | 833 } |
838 | 834 |
839 } // namespace chromeos | 835 } // namespace chromeos |
OLD | NEW |