| 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.
|
|
|