Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 248343002: Convert chromeos::EventRewriter to a ui::EventRewriter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@x354034-kder
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 SystemKeyEventListener::Initialize(); 697 SystemKeyEventListener::Initialize();
698 } 698 }
699 699
700 // Listen for XI_HierarchyChanged events. Note: if this is moved to 700 // Listen for XI_HierarchyChanged events. Note: if this is moved to
701 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown 701 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown
702 // reasons, see http://crosbug.com/24833. 702 // reasons, see http://crosbug.com/24833.
703 XInputHierarchyChangedEventListener::GetInstance(); 703 XInputHierarchyChangedEventListener::GetInstance();
704 704
705 // Start the CrOS input device UMA watcher 705 // Start the CrOS input device UMA watcher
706 DeviceUMA::GetInstance(); 706 DeviceUMA::GetInstance();
707
708 event_rewriter_.reset(new EventRewriter());
709 #endif 707 #endif
710 keyboard_event_rewriters_.reset(new EventRewriterController()); 708 keyboard_event_rewriters_.reset(new EventRewriterController());
711 keyboard_event_rewriters_->AddEventRewriter( 709 keyboard_event_rewriters_->AddEventRewriter(
712 scoped_ptr<ui::EventRewriter>(new KeyboardDrivenEventRewriter()).Pass()); 710 scoped_ptr<ui::EventRewriter>(new KeyboardDrivenEventRewriter()).Pass());
711 keyboard_event_rewriters_->AddEventRewriter(
712 scoped_ptr<ui::EventRewriter>(new EventRewriter()).Pass());
Daniel Erat 2014/04/22 23:58:36 don't quote me on it, but i think that you don't n
kpschoedel 2014/04/23 15:46:22 Done.
713 713
714 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 714 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
715 // -- immediately after ChildProcess::WaitForDebugger(). 715 // -- immediately after ChildProcess::WaitForDebugger().
716 716
717 // Start the out-of-memory priority manager here so that we give the most 717 // Start the out-of-memory priority manager here so that we give the most
718 // amount of time for the other services to start up before we start 718 // amount of time for the other services to start up before we start
719 // adjusting the oom priority. 719 // adjusting the oom priority.
720 g_browser_process->platform_part()->oom_priority_manager()->Start(); 720 g_browser_process->platform_part()->oom_priority_manager()->Start();
721 721
722 if (ui::ShouldDefaultToNaturalScroll()) { 722 if (ui::ShouldDefaultToNaturalScroll()) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 peripheral_battery_observer_.reset(); 774 peripheral_battery_observer_.reset();
775 power_prefs_.reset(); 775 power_prefs_.reset();
776 776
777 // Let the ScreenLocker unregister itself from SessionManagerClient before 777 // Let the ScreenLocker unregister itself from SessionManagerClient before
778 // DBusThreadManager is shut down. 778 // DBusThreadManager is shut down.
779 if (!KioskModeSettings::Get()->IsKioskModeEnabled()) 779 if (!KioskModeSettings::Get()->IsKioskModeEnabled())
780 ScreenLocker::ShutDownClass(); 780 ScreenLocker::ShutDownClass();
781 781
782 keyboard_event_rewriters_->Shutdown(); 782 keyboard_event_rewriters_->Shutdown();
783 #if defined(USE_X11) 783 #if defined(USE_X11)
784 event_rewriter_.reset();
785
786 // The XInput2 event listener needs to be shut down earlier than when 784 // The XInput2 event listener needs to be shut down earlier than when
787 // Singletons are finally destroyed in AtExitManager. 785 // Singletons are finally destroyed in AtExitManager.
788 XInputHierarchyChangedEventListener::GetInstance()->Stop(); 786 XInputHierarchyChangedEventListener::GetInstance()->Stop();
789 787
790 DeviceUMA::GetInstance()->Stop(); 788 DeviceUMA::GetInstance()->Stop();
791 789
792 // SystemKeyEventListener::Shutdown() is always safe to call, 790 // SystemKeyEventListener::Shutdown() is always safe to call,
793 // even if Initialize() wasn't called. 791 // even if Initialize() wasn't called.
794 SystemKeyEventListener::Shutdown(); 792 SystemKeyEventListener::Shutdown();
795 #endif 793 #endif
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 // Destroy DBus services immediately after threads are stopped. 840 // Destroy DBus services immediately after threads are stopped.
843 dbus_services_.reset(); 841 dbus_services_.reset();
844 842
845 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 843 ChromeBrowserMainPartsLinux::PostDestroyThreads();
846 844
847 // Destroy DeviceSettingsService after g_browser_process. 845 // Destroy DeviceSettingsService after g_browser_process.
848 DeviceSettingsService::Shutdown(); 846 DeviceSettingsService::Shutdown();
849 } 847 }
850 848
851 } // namespace chromeos 849 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698