| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ | 5 #ifndef ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ |
| 6 #define ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ | 6 #define ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/sticky_keys/sticky_keys_state.h" | 9 #include "ash/sticky_keys/sticky_keys_state.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // | 140 // |
| 141 // Here, (*) means key event will be consumed by StickyKeys, and (#) means event | 141 // Here, (*) means key event will be consumed by StickyKeys, and (#) means event |
| 142 // is modified. | 142 // is modified. |
| 143 class ASH_EXPORT StickyKeysHandler { | 143 class ASH_EXPORT StickyKeysHandler { |
| 144 public: | 144 public: |
| 145 class StickyKeysHandlerDelegate { | 145 class StickyKeysHandlerDelegate { |
| 146 public: | 146 public: |
| 147 StickyKeysHandlerDelegate(); | 147 StickyKeysHandlerDelegate(); |
| 148 virtual ~StickyKeysHandlerDelegate(); | 148 virtual ~StickyKeysHandlerDelegate(); |
| 149 | 149 |
| 150 // Dispatches keyboard event synchronously. | 150 // Dispatches keyboard event synchronously. |event| is an event that has |
| 151 // been previously dispatched. |
| 151 virtual void DispatchKeyEvent(ui::KeyEvent* event, | 152 virtual void DispatchKeyEvent(ui::KeyEvent* event, |
| 152 aura::Window* target) = 0; | 153 aura::Window* target) = 0; |
| 153 | 154 |
| 154 // Dispatches mouse event synchronously. | 155 // Dispatches mouse event synchronously. |event| is an event that has |
| 156 // been previously dispatched. |
| 155 virtual void DispatchMouseEvent(ui::MouseEvent* event, | 157 virtual void DispatchMouseEvent(ui::MouseEvent* event, |
| 156 aura::Window* target) = 0; | 158 aura::Window* target) = 0; |
| 157 | 159 |
| 158 // Dispatches scroll event synchronously. | 160 // Dispatches scroll event synchronously. |event| is an event that has |
| 161 // been previously dispatched. |
| 159 virtual void DispatchScrollEvent(ui::ScrollEvent* event, | 162 virtual void DispatchScrollEvent(ui::ScrollEvent* event, |
| 160 aura::Window* target) = 0; | 163 aura::Window* target) = 0; |
| 161 }; | 164 }; |
| 162 | 165 |
| 163 // This class takes an ownership of |delegate|. | 166 // This class takes an ownership of |delegate|. |
| 164 StickyKeysHandler(ui::EventFlags modifier_flag, | 167 StickyKeysHandler(ui::EventFlags modifier_flag, |
| 165 StickyKeysHandlerDelegate* delegate); | 168 StickyKeysHandlerDelegate* delegate); |
| 166 ~StickyKeysHandler(); | 169 ~StickyKeysHandler(); |
| 167 | 170 |
| 168 // Handles key event. Returns true if key is consumed. | 171 // Handles key event. Returns true if key is consumed. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 scoped_ptr<ui::KeyEvent> modifier_up_event_; | 241 scoped_ptr<ui::KeyEvent> modifier_up_event_; |
| 239 | 242 |
| 240 scoped_ptr<StickyKeysHandlerDelegate> delegate_; | 243 scoped_ptr<StickyKeysHandlerDelegate> delegate_; |
| 241 | 244 |
| 242 DISALLOW_COPY_AND_ASSIGN(StickyKeysHandler); | 245 DISALLOW_COPY_AND_ASSIGN(StickyKeysHandler); |
| 243 }; | 246 }; |
| 244 | 247 |
| 245 } // namespace ash | 248 } // namespace ash |
| 246 | 249 |
| 247 #endif // ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ | 250 #endif // ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ |
| OLD | NEW |