Chromium Code Reviews| Index: ash/root_window_controller.cc |
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
| index aafe0ba0c61f8dbeea3e3b61770b5191935adab0..eff3aacfe473fd41973abf137f1802d238ab9bed 100644 |
| --- a/ash/root_window_controller.cc |
| +++ b/ash/root_window_controller.cc |
| @@ -9,6 +9,7 @@ |
| #include "ash/ash_constants.h" |
| #include "ash/ash_switches.h" |
| +#include "ash/audio/sounds.h" |
|
dmazzoni
2014/07/15 18:04:02
No longer needed?
lisayin
2014/07/15 18:47:43
Done.
|
| #include "ash/desktop_background/desktop_background_controller.h" |
| #include "ash/desktop_background/desktop_background_widget_controller.h" |
| #include "ash/desktop_background/user_wallpaper_delegate.h" |
| @@ -76,7 +77,7 @@ |
| #include "ui/wm/public/window_types.h" |
| #if defined(OS_CHROMEOS) |
| -#include "ash/system/tray_accessibility.h" |
| +#include "ash/ash_touch_exploration_manager_chromeos.h" |
| #include "ash/wm/boot_splash_screen_chromeos.h" |
| #include "ui/chromeos/touch_exploration_controller.h" |
| #endif |
| @@ -261,54 +262,6 @@ class EmptyWindowDelegate : public aura::WindowDelegate { |
| DISALLOW_COPY_AND_ASSIGN(EmptyWindowDelegate); |
| }; |
| -#if defined(OS_CHROMEOS) |
| -// Responsible for initializing TouchExplorationController when spoken |
| -// feedback is on. |
| -class CrosAccessibilityObserver : public AccessibilityObserver { |
|
James Cook
2014/07/15 18:21:57
Hooray for making root_window_controller.cc shorte
|
| - public: |
| - explicit CrosAccessibilityObserver( |
| - RootWindowController* root_window_controller) |
| - : root_window_controller_(root_window_controller) { |
| - Shell::GetInstance()->system_tray_notifier()-> |
| - AddAccessibilityObserver(this); |
| - UpdateTouchExplorationState(); |
| - } |
| - |
| - virtual ~CrosAccessibilityObserver() { |
| - SystemTrayNotifier* system_tray_notifier = |
| - Shell::GetInstance()->system_tray_notifier(); |
| - if (system_tray_notifier) |
| - system_tray_notifier->RemoveAccessibilityObserver(this); |
| - } |
| - |
| - private: |
| - void UpdateTouchExplorationState() { |
| - AccessibilityDelegate* delegate = |
| - Shell::GetInstance()->accessibility_delegate(); |
| - bool enabled = delegate->IsSpokenFeedbackEnabled(); |
| - |
| - if (enabled && !touch_exploration_controller_.get()) { |
| - touch_exploration_controller_.reset( |
| - new ui::TouchExplorationController( |
| - root_window_controller_->GetRootWindow())); |
| - } else if (!enabled) { |
| - touch_exploration_controller_.reset(); |
| - } |
| - } |
| - |
| - // Overridden from AccessibilityObserver. |
| - virtual void OnAccessibilityModeChanged( |
| - AccessibilityNotificationVisibility notify) OVERRIDE { |
| - UpdateTouchExplorationState(); |
| - } |
| - |
| - scoped_ptr<ui::TouchExplorationController> touch_exploration_controller_; |
| - RootWindowController* root_window_controller_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(CrosAccessibilityObserver); |
| -}; |
| -#endif // OS_CHROMEOS |
| - |
| } // namespace |
| void RootWindowController::CreateForPrimaryDisplay(AshWindowTreeHost* host) { |