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