| 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_H_ | 5 #ifndef COMPONENTS_EXO_WM_HELPER_H_ |
| 6 #define COMPONENTS_EXO_WM_HELPER_H_ | 6 #define COMPONENTS_EXO_WM_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "ui/base/cursor/cursor.h" | 10 #include "ui/base/cursor/cursor.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 virtual void OnCursorVisibilityChanged(bool is_visible) {} | 49 virtual void OnCursorVisibilityChanged(bool is_visible) {} |
| 50 virtual void OnCursorSetChanged(ui::CursorSetType cursor_set) {} | 50 virtual void OnCursorSetChanged(ui::CursorSetType cursor_set) {} |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 virtual ~CursorObserver() {} | 53 virtual ~CursorObserver() {} |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 class MaximizeModeObserver { | 56 class MaximizeModeObserver { |
| 57 public: | 57 public: |
| 58 virtual void OnMaximizeModeStarted() = 0; | 58 virtual void OnMaximizeModeStarted() = 0; |
| 59 virtual void OnMaximizeModeEnding() = 0; |
| 59 virtual void OnMaximizeModeEnded() = 0; | 60 virtual void OnMaximizeModeEnded() = 0; |
| 60 | 61 |
| 61 protected: | 62 protected: |
| 62 virtual ~MaximizeModeObserver() {} | 63 virtual ~MaximizeModeObserver() {} |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 class AccessibilityObserver { | 66 class AccessibilityObserver { |
| 66 public: | 67 public: |
| 67 virtual void OnAccessibilityModeChanged() = 0; | 68 virtual void OnAccessibilityModeChanged() = 0; |
| 68 | 69 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 protected: | 115 protected: |
| 115 WMHelper(); | 116 WMHelper(); |
| 116 | 117 |
| 117 void NotifyWindowActivated(aura::Window* gained_active, | 118 void NotifyWindowActivated(aura::Window* gained_active, |
| 118 aura::Window* lost_active); | 119 aura::Window* lost_active); |
| 119 void NotifyWindowFocused(aura::Window* gained_focus, | 120 void NotifyWindowFocused(aura::Window* gained_focus, |
| 120 aura::Window* lost_focus); | 121 aura::Window* lost_focus); |
| 121 void NotifyCursorVisibilityChanged(bool is_visible); | 122 void NotifyCursorVisibilityChanged(bool is_visible); |
| 122 void NotifyCursorSetChanged(ui::CursorSetType cursor_set); | 123 void NotifyCursorSetChanged(ui::CursorSetType cursor_set); |
| 123 void NotifyMaximizeModeStarted(); | 124 void NotifyMaximizeModeStarted(); |
| 125 void NotifyMaximizeModeEnding(); |
| 124 void NotifyMaximizeModeEnded(); | 126 void NotifyMaximizeModeEnded(); |
| 125 void NotifyAccessibilityModeChanged(); | 127 void NotifyAccessibilityModeChanged(); |
| 126 void NotifyKeyboardDeviceConfigurationChanged(); | 128 void NotifyKeyboardDeviceConfigurationChanged(); |
| 127 | 129 |
| 128 private: | 130 private: |
| 129 base::ObserverList<ActivationObserver> activation_observers_; | 131 base::ObserverList<ActivationObserver> activation_observers_; |
| 130 base::ObserverList<FocusObserver> focus_observers_; | 132 base::ObserverList<FocusObserver> focus_observers_; |
| 131 base::ObserverList<CursorObserver> cursor_observers_; | 133 base::ObserverList<CursorObserver> cursor_observers_; |
| 132 base::ObserverList<MaximizeModeObserver> maximize_mode_observers_; | 134 base::ObserverList<MaximizeModeObserver> maximize_mode_observers_; |
| 133 base::ObserverList<AccessibilityObserver> accessibility_observers_; | 135 base::ObserverList<AccessibilityObserver> accessibility_observers_; |
| 134 base::ObserverList<InputDeviceEventObserver> input_device_event_observers_; | 136 base::ObserverList<InputDeviceEventObserver> input_device_event_observers_; |
| 135 | 137 |
| 136 DISALLOW_COPY_AND_ASSIGN(WMHelper); | 138 DISALLOW_COPY_AND_ASSIGN(WMHelper); |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 } // namespace exo | 141 } // namespace exo |
| 140 | 142 |
| 141 #endif // COMPONENTS_EXO_WM_HELPER_H_ | 143 #endif // COMPONENTS_EXO_WM_HELPER_H_ |
| OLD | NEW |