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

Unified Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 2114043002: Two fixes for mash browser_tests on chromes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/root_window_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/chrome_browser_main_chromeos.cc
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
index a29bfaef1816a1ec30d93f6c5bb5718d49849536..b92ca1875bf9ba4b33094f552d0cc96ee7b6b509 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -707,13 +707,15 @@ void ChromeBrowserMainPartsChromeos::PreBrowserStart() {
SystemKeyEventListener::Initialize();
}
- // Listen for XI_HierarchyChanged events. Note: if this is moved to
- // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown
- // reasons, see http://crosbug.com/24833.
- XInputHierarchyChangedEventListener::GetInstance();
+ if (!chrome::IsRunningInMash()) {
+ // Listen for XI_HierarchyChanged events. Note: if this is moved to
+ // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown
+ // reasons, see http://crosbug.com/24833.
+ XInputHierarchyChangedEventListener::GetInstance();
- // Start the CrOS input device UMA watcher
- DeviceUMA::GetInstance();
+ // Start the CrOS input device UMA watcher
+ DeviceUMA::GetInstance();
+ }
#endif
// -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
@@ -729,9 +731,9 @@ void ChromeBrowserMainPartsChromeos::PreBrowserStart() {
}
void ChromeBrowserMainPartsChromeos::PostBrowserStart() {
- system::InputDeviceSettings::Get()->InitTouchDevicesStatusFromLocalPrefs();
-
if (!chrome::IsRunningInMash()) {
+ system::InputDeviceSettings::Get()->InitTouchDevicesStatusFromLocalPrefs();
+
// These are dependent on the ash::Shell singleton already having been
// initialized. Consequently, these cannot be used when running as a mus
// client.
@@ -794,11 +796,13 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() {
ScreenLocker::ShutDownClass();
keyboard_event_rewriters_.reset();
#if defined(USE_X11)
- // The XInput2 event listener needs to be shut down earlier than when
- // Singletons are finally destroyed in AtExitManager.
- XInputHierarchyChangedEventListener::GetInstance()->Stop();
+ if (!chrome::IsRunningInMash()) {
+ // The XInput2 event listener needs to be shut down earlier than when
+ // Singletons are finally destroyed in AtExitManager.
+ XInputHierarchyChangedEventListener::GetInstance()->Stop();
- DeviceUMA::GetInstance()->Stop();
+ DeviceUMA::GetInstance()->Stop();
+ }
// SystemKeyEventListener::Shutdown() is always safe to call,
// even if Initialize() wasn't called.
« no previous file with comments | « ash/mus/root_window_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698