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

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

Issue 165463002: event-rewrite: Clean up how events are rewritten. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 | Annotate | Revision Log
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 14 matching lines...) Expand all
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
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());
Daniel Erat 2014/02/14 15:56:29 nit: blank line after this to set it off from the
sadrul 2014/02/14 17:23:14 Done.
705 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 707 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
706 // -- immediately after ChildProcess::WaitForDebugger(). 708 // -- immediately after ChildProcess::WaitForDebugger().
707 709
708 // Start the out-of-memory priority manager here so that we give the most 710 // 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 711 // amount of time for the other services to start up before we start
710 // adjusting the oom priority. 712 // adjusting the oom priority.
711 g_browser_process->platform_part()->oom_priority_manager()->Start(); 713 g_browser_process->platform_part()->oom_priority_manager()->Start();
712 714
713 if (ui::ShouldDefaultToNaturalScroll()) { 715 if (ui::ShouldDefaultToNaturalScroll()) {
714 CommandLine::ForCurrentProcess()->AppendSwitch( 716 CommandLine::ForCurrentProcess()->AppendSwitch(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 // shutdown DeviceSettingsService yet, it might still be accessed by 761 // shutdown DeviceSettingsService yet, it might still be accessed by
760 // BrowserPolicyConnector (owned by g_browser_process). 762 // BrowserPolicyConnector (owned by g_browser_process).
761 DeviceSettingsService::Get()->UnsetSessionManager(); 763 DeviceSettingsService::Get()->UnsetSessionManager();
762 764
763 // We should remove observers attached to D-Bus clients before 765 // We should remove observers attached to D-Bus clients before
764 // DBusThreadManager is shut down. 766 // DBusThreadManager is shut down.
765 extension_system_event_observer_.reset(); 767 extension_system_event_observer_.reset();
766 retail_mode_power_save_blocker_.reset(); 768 retail_mode_power_save_blocker_.reset();
767 peripheral_battery_observer_.reset(); 769 peripheral_battery_observer_.reset();
768 power_prefs_.reset(); 770 power_prefs_.reset();
771 event_rewriter_.reset();
769 772
770 // The XInput2 event listener needs to be shut down earlier than when 773 // The XInput2 event listener needs to be shut down earlier than when
771 // Singletons are finally destroyed in AtExitManager. 774 // Singletons are finally destroyed in AtExitManager.
772 XInputHierarchyChangedEventListener::GetInstance()->Stop(); 775 XInputHierarchyChangedEventListener::GetInstance()->Stop();
773 776
774 #if defined(USE_X11) 777 #if defined(USE_X11)
775 DeviceUMA::GetInstance()->Stop(); 778 DeviceUMA::GetInstance()->Stop();
776 #endif 779 #endif
777 780
778 // SystemKeyEventListener::Shutdown() is always safe to call, 781 // SystemKeyEventListener::Shutdown() is always safe to call,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 // Destroy DBus services immediately after threads are stopped. 829 // Destroy DBus services immediately after threads are stopped.
827 dbus_services_.reset(); 830 dbus_services_.reset();
828 831
829 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 832 ChromeBrowserMainPartsLinux::PostDestroyThreads();
830 833
831 // Destroy DeviceSettingsService after g_browser_process. 834 // Destroy DeviceSettingsService after g_browser_process.
832 DeviceSettingsService::Shutdown(); 835 DeviceSettingsService::Shutdown();
833 } 836 }
834 837
835 } // namespace chromeos 838 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698