| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_EXO_WM_HELPER_ASH_H_ | 5 #ifndef COMPONENTS_EXO_WM_HELPER_ASH_H_ |
| 6 #define COMPONENTS_EXO_WM_HELPER_ASH_H_ | 6 #define COMPONENTS_EXO_WM_HELPER_ASH_H_ |
| 7 | 7 |
| 8 #include "ash/common/shell_observer.h" | 8 #include "ash/common/shell_observer.h" |
| 9 #include "ash/common/system/accessibility_observer.h" |
| 9 #include "base/macros.h" | 10 #include "base/macros.h" |
| 10 #include "components/exo/wm_helper.h" | 11 #include "components/exo/wm_helper.h" |
| 11 #include "ui/aura/client/cursor_client_observer.h" | 12 #include "ui/aura/client/cursor_client_observer.h" |
| 12 #include "ui/aura/client/focus_change_observer.h" | 13 #include "ui/aura/client/focus_change_observer.h" |
| 13 #include "ui/wm/public/activation_change_observer.h" | 14 #include "ui/wm/public/activation_change_observer.h" |
| 14 | 15 |
| 15 namespace exo { | 16 namespace exo { |
| 16 | 17 |
| 17 // A helper class for accessing WindowManager related features. | 18 // A helper class for accessing WindowManager related features. |
| 18 class WMHelperAsh : public WMHelper, | 19 class WMHelperAsh : public WMHelper, |
| 19 public aura::client::ActivationChangeObserver, | 20 public aura::client::ActivationChangeObserver, |
| 20 public aura::client::FocusChangeObserver, | 21 public aura::client::FocusChangeObserver, |
| 21 public aura::client::CursorClientObserver, | 22 public aura::client::CursorClientObserver, |
| 23 public ash::AccessibilityObserver, |
| 22 public ash::ShellObserver { | 24 public ash::ShellObserver { |
| 23 public: | 25 public: |
| 24 WMHelperAsh(); | 26 WMHelperAsh(); |
| 25 ~WMHelperAsh() override; | 27 ~WMHelperAsh() override; |
| 26 | 28 |
| 27 // Overriden from WMHelper: | 29 // Overriden from WMHelper: |
| 28 const display::ManagedDisplayInfo GetDisplayInfo( | 30 const display::ManagedDisplayInfo GetDisplayInfo( |
| 29 int64_t display_id) const override; | 31 int64_t display_id) const override; |
| 30 aura::Window* GetContainer(int container_id) override; | 32 aura::Window* GetContainer(int container_id) override; |
| 31 aura::Window* GetActiveWindow() const override; | 33 aura::Window* GetActiveWindow() const override; |
| 32 aura::Window* GetFocusedWindow() const override; | 34 aura::Window* GetFocusedWindow() const override; |
| 33 ui::CursorSetType GetCursorSet() const override; | 35 ui::CursorSetType GetCursorSet() const override; |
| 34 void AddPreTargetHandler(ui::EventHandler* handler) override; | 36 void AddPreTargetHandler(ui::EventHandler* handler) override; |
| 35 void PrependPreTargetHandler(ui::EventHandler* handler) override; | 37 void PrependPreTargetHandler(ui::EventHandler* handler) override; |
| 36 void RemovePreTargetHandler(ui::EventHandler* handler) override; | 38 void RemovePreTargetHandler(ui::EventHandler* handler) override; |
| 37 void AddPostTargetHandler(ui::EventHandler* handler) override; | 39 void AddPostTargetHandler(ui::EventHandler* handler) override; |
| 38 void RemovePostTargetHandler(ui::EventHandler* handler) override; | 40 void RemovePostTargetHandler(ui::EventHandler* handler) override; |
| 39 bool IsMaximizeModeWindowManagerEnabled() const override; | 41 bool IsMaximizeModeWindowManagerEnabled() const override; |
| 42 bool IsSpokenFeedbackEnabled() const override; |
| 43 void PlayEarcon(int sound_key) const override; |
| 40 | 44 |
| 41 // Overriden from aura::client::ActivationChangeObserver: | 45 // Overriden from aura::client::ActivationChangeObserver: |
| 42 void OnWindowActivated( | 46 void OnWindowActivated( |
| 43 aura::client::ActivationChangeObserver::ActivationReason reason, | 47 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 44 aura::Window* gained_active, | 48 aura::Window* gained_active, |
| 45 aura::Window* lost_active) override; | 49 aura::Window* lost_active) override; |
| 46 | 50 |
| 47 // Overriden from aura::client::FocusChangeObserver: | 51 // Overriden from aura::client::FocusChangeObserver: |
| 48 void OnWindowFocused(aura::Window* gained_focus, | 52 void OnWindowFocused(aura::Window* gained_focus, |
| 49 aura::Window* lost_focus) override; | 53 aura::Window* lost_focus) override; |
| 50 | 54 |
| 51 // Overriden from aura::client::CursorClientObserver: | 55 // Overriden from aura::client::CursorClientObserver: |
| 52 void OnCursorVisibilityChanged(bool is_visible) override; | 56 void OnCursorVisibilityChanged(bool is_visible) override; |
| 53 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; | 57 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; |
| 54 | 58 |
| 59 // Overridden from ash::AccessibilityObserver: |
| 60 void OnAccessibilityModeChanged( |
| 61 ash::AccessibilityNotificationVisibility notify) override; |
| 62 |
| 55 // Overriden from ash::ShellObserver: | 63 // Overriden from ash::ShellObserver: |
| 56 void OnMaximizeModeStarted() override; | 64 void OnMaximizeModeStarted() override; |
| 57 void OnMaximizeModeEnded() override; | 65 void OnMaximizeModeEnded() override; |
| 58 | 66 |
| 59 private: | 67 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh); | 68 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh); |
| 61 }; | 69 }; |
| 62 | 70 |
| 63 } // namespace exo | 71 } // namespace exo |
| 64 | 72 |
| 65 #endif // COMPONENTS_EXO_WM_HELPER_H_ | 73 #endif // COMPONENTS_EXO_WM_HELPER_H_ |
| OLD | NEW |