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/shell_observer.h" | 8 #include "ash/shell_observer.h" |
9 #include "ash/system/accessibility_observer.h" | 9 #include "ash/system/accessibility_observer.h" |
| 10 #include "ash/wm/ash_native_cursor_manager.h" |
10 #include "ash/wm_display_observer.h" | 11 #include "ash/wm_display_observer.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "components/exo/wm_helper.h" | 13 #include "components/exo/wm_helper.h" |
13 #include "ui/aura/client/cursor_client_observer.h" | 14 #include "ui/aura/client/cursor_client_observer.h" |
14 #include "ui/aura/client/focus_change_observer.h" | 15 #include "ui/aura/client/focus_change_observer.h" |
15 #include "ui/events/devices/input_device_event_observer.h" | 16 #include "ui/events/devices/input_device_event_observer.h" |
16 #include "ui/wm/public/activation_change_observer.h" | 17 #include "ui/wm/public/activation_change_observer.h" |
17 | 18 |
18 namespace exo { | 19 namespace exo { |
19 | 20 |
20 // A helper class for accessing WindowManager related features. | 21 // A helper class for accessing WindowManager related features. |
21 class WMHelperAsh : public WMHelper, | 22 class WMHelperAsh : public WMHelper, |
22 public aura::client::ActivationChangeObserver, | 23 public aura::client::ActivationChangeObserver, |
23 public aura::client::FocusChangeObserver, | 24 public aura::client::FocusChangeObserver, |
24 public aura::client::CursorClientObserver, | 25 public aura::client::CursorClientObserver, |
25 public ash::AccessibilityObserver, | 26 public ash::AccessibilityObserver, |
| 27 public ash::AshNativeCursorManager::Observer, |
26 public ash::ShellObserver, | 28 public ash::ShellObserver, |
27 public ash::WmDisplayObserver, | 29 public ash::WmDisplayObserver, |
28 public ui::InputDeviceEventObserver { | 30 public ui::InputDeviceEventObserver { |
29 public: | 31 public: |
30 WMHelperAsh(); | 32 WMHelperAsh(); |
31 ~WMHelperAsh() override; | 33 ~WMHelperAsh() override; |
32 | 34 |
33 // Overridden from WMHelper: | 35 // Overridden from WMHelper: |
34 const display::ManagedDisplayInfo GetDisplayInfo( | 36 const display::ManagedDisplayInfo GetDisplayInfo( |
35 int64_t display_id) const override; | 37 int64_t display_id) const override; |
36 aura::Window* GetContainer(int container_id) override; | 38 aura::Window* GetContainer(int64_t display_id, int container_id) override; |
37 aura::Window* GetActiveWindow() const override; | 39 aura::Window* GetActiveWindow() const override; |
38 aura::Window* GetFocusedWindow() const override; | 40 aura::Window* GetFocusedWindow() const override; |
39 ui::CursorSetType GetCursorSet() const override; | 41 ui::CursorSetType GetCursorSet() const override; |
40 void AddPreTargetHandler(ui::EventHandler* handler) override; | 42 void AddPreTargetHandler(ui::EventHandler* handler) override; |
41 void PrependPreTargetHandler(ui::EventHandler* handler) override; | 43 void PrependPreTargetHandler(ui::EventHandler* handler) override; |
42 void RemovePreTargetHandler(ui::EventHandler* handler) override; | 44 void RemovePreTargetHandler(ui::EventHandler* handler) override; |
43 void AddPostTargetHandler(ui::EventHandler* handler) override; | 45 void AddPostTargetHandler(ui::EventHandler* handler) override; |
44 void RemovePostTargetHandler(ui::EventHandler* handler) override; | 46 void RemovePostTargetHandler(ui::EventHandler* handler) override; |
45 bool IsMaximizeModeWindowManagerEnabled() const override; | 47 bool IsMaximizeModeWindowManagerEnabled() const override; |
46 bool IsSpokenFeedbackEnabled() const override; | 48 bool IsSpokenFeedbackEnabled() const override; |
47 void PlayEarcon(int sound_key) const override; | 49 void PlayEarcon(int sound_key) const override; |
48 | 50 |
49 // Overridden from aura::client::ActivationChangeObserver: | 51 // Overridden from aura::client::ActivationChangeObserver: |
50 void OnWindowActivated( | 52 void OnWindowActivated( |
51 aura::client::ActivationChangeObserver::ActivationReason reason, | 53 aura::client::ActivationChangeObserver::ActivationReason reason, |
52 aura::Window* gained_active, | 54 aura::Window* gained_active, |
53 aura::Window* lost_active) override; | 55 aura::Window* lost_active) override; |
54 | 56 |
55 // Overridden from aura::client::FocusChangeObserver: | 57 // Overridden from aura::client::FocusChangeObserver: |
56 void OnWindowFocused(aura::Window* gained_focus, | 58 void OnWindowFocused(aura::Window* gained_focus, |
57 aura::Window* lost_focus) override; | 59 aura::Window* lost_focus) override; |
58 | 60 |
59 // Overridden from aura::client::CursorClientObserver: | 61 // Overridden from aura::client::CursorClientObserver: |
60 void OnCursorVisibilityChanged(bool is_visible) override; | 62 void OnCursorVisibilityChanged(bool is_visible) override; |
61 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; | 63 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; |
62 | 64 |
| 65 // Overridden from ash::AshNativeCursorManager::Observer: |
| 66 void OnCursorDisplayChanging(const display::Display& display) override; |
| 67 |
63 // Overridden from ash::AccessibilityObserver: | 68 // Overridden from ash::AccessibilityObserver: |
64 void OnAccessibilityModeChanged( | 69 void OnAccessibilityModeChanged( |
65 ash::AccessibilityNotificationVisibility notify) override; | 70 ash::AccessibilityNotificationVisibility notify) override; |
66 | 71 |
67 // Overridden from ash::ShellObserver: | 72 // Overridden from ash::ShellObserver: |
68 void OnMaximizeModeStarted() override; | 73 void OnMaximizeModeStarted() override; |
69 void OnMaximizeModeEnding() override; | 74 void OnMaximizeModeEnding() override; |
70 void OnMaximizeModeEnded() override; | 75 void OnMaximizeModeEnded() override; |
71 | 76 |
72 // Overridden from ash::WmDisplayObserver: | 77 // Overridden from ash::WmDisplayObserver: |
73 void OnDisplayConfigurationChanged() override; | 78 void OnDisplayConfigurationChanged() override; |
74 | 79 |
75 // Overridden from ui::InputDeviceEventObserver: | 80 // Overridden from ui::InputDeviceEventObserver: |
76 void OnKeyboardDeviceConfigurationChanged() override; | 81 void OnKeyboardDeviceConfigurationChanged() override; |
77 | 82 |
78 private: | 83 private: |
79 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh); | 84 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh); |
80 }; | 85 }; |
81 | 86 |
82 } // namespace exo | 87 } // namespace exo |
83 | 88 |
84 #endif // COMPONENTS_EXO_WM_HELPER_H_ | 89 #endif // COMPONENTS_EXO_WM_HELPER_H_ |
OLD | NEW |