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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 SystemKeyEventListener::Initialize(); | 713 SystemKeyEventListener::Initialize(); |
714 } | 714 } |
715 | 715 |
716 // Listen for XI_HierarchyChanged events. Note: if this is moved to | 716 // Listen for XI_HierarchyChanged events. Note: if this is moved to |
717 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown | 717 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown |
718 // reasons, see http://crosbug.com/24833. | 718 // reasons, see http://crosbug.com/24833. |
719 XInputHierarchyChangedEventListener::GetInstance(); | 719 XInputHierarchyChangedEventListener::GetInstance(); |
720 | 720 |
721 // Start the CrOS input device UMA watcher | 721 // Start the CrOS input device UMA watcher |
722 DeviceUMA::GetInstance(); | 722 DeviceUMA::GetInstance(); |
723 | |
724 event_rewriter_.reset(new EventRewriter()); | |
725 #endif | 723 #endif |
726 keyboard_event_rewriters_.reset(new EventRewriterController()); | 724 keyboard_event_rewriters_.reset(new EventRewriterController()); |
727 keyboard_event_rewriters_->AddEventRewriter( | 725 keyboard_event_rewriters_->AddEventRewriter( |
728 scoped_ptr<ui::EventRewriter>(new KeyboardDrivenEventRewriter())); | 726 scoped_ptr<ui::EventRewriter>(new KeyboardDrivenEventRewriter())); |
| 727 keyboard_event_rewriters_->AddEventRewriter( |
| 728 scoped_ptr<ui::EventRewriter>(new EventRewriter())); |
729 | 729 |
730 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 730 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
731 // -- immediately after ChildProcess::WaitForDebugger(). | 731 // -- immediately after ChildProcess::WaitForDebugger(). |
732 | 732 |
733 // Start the out-of-memory priority manager here so that we give the most | 733 // Start the out-of-memory priority manager here so that we give the most |
734 // amount of time for the other services to start up before we start | 734 // amount of time for the other services to start up before we start |
735 // adjusting the oom priority. | 735 // adjusting the oom priority. |
736 g_browser_process->platform_part()->oom_priority_manager()->Start(); | 736 g_browser_process->platform_part()->oom_priority_manager()->Start(); |
737 | 737 |
738 if (ui::ShouldDefaultToNaturalScroll()) { | 738 if (ui::ShouldDefaultToNaturalScroll()) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 peripheral_battery_observer_.reset(); | 790 peripheral_battery_observer_.reset(); |
791 power_prefs_.reset(); | 791 power_prefs_.reset(); |
792 | 792 |
793 // Let the ScreenLocker unregister itself from SessionManagerClient before | 793 // Let the ScreenLocker unregister itself from SessionManagerClient before |
794 // DBusThreadManager is shut down. | 794 // DBusThreadManager is shut down. |
795 if (!KioskModeSettings::Get()->IsKioskModeEnabled()) | 795 if (!KioskModeSettings::Get()->IsKioskModeEnabled()) |
796 ScreenLocker::ShutDownClass(); | 796 ScreenLocker::ShutDownClass(); |
797 | 797 |
798 keyboard_event_rewriters_.reset(); | 798 keyboard_event_rewriters_.reset(); |
799 #if defined(USE_X11) | 799 #if defined(USE_X11) |
800 event_rewriter_.reset(); | |
801 | |
802 // The XInput2 event listener needs to be shut down earlier than when | 800 // The XInput2 event listener needs to be shut down earlier than when |
803 // Singletons are finally destroyed in AtExitManager. | 801 // Singletons are finally destroyed in AtExitManager. |
804 XInputHierarchyChangedEventListener::GetInstance()->Stop(); | 802 XInputHierarchyChangedEventListener::GetInstance()->Stop(); |
805 | 803 |
806 DeviceUMA::GetInstance()->Stop(); | 804 DeviceUMA::GetInstance()->Stop(); |
807 | 805 |
808 // SystemKeyEventListener::Shutdown() is always safe to call, | 806 // SystemKeyEventListener::Shutdown() is always safe to call, |
809 // even if Initialize() wasn't called. | 807 // even if Initialize() wasn't called. |
810 SystemKeyEventListener::Shutdown(); | 808 SystemKeyEventListener::Shutdown(); |
811 #endif | 809 #endif |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 // Destroy DBus services immediately after threads are stopped. | 856 // Destroy DBus services immediately after threads are stopped. |
859 dbus_services_.reset(); | 857 dbus_services_.reset(); |
860 | 858 |
861 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 859 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
862 | 860 |
863 // Destroy DeviceSettingsService after g_browser_process. | 861 // Destroy DeviceSettingsService after g_browser_process. |
864 DeviceSettingsService::Shutdown(); | 862 DeviceSettingsService::Shutdown(); |
865 } | 863 } |
866 | 864 |
867 } // namespace chromeos | 865 } // namespace chromeos |
OLD | NEW |