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_WM_STICKY_KEYS_H_ | 5 #ifndef ASH_WM_STICKY_KEYS_H_ |
6 #define ASH_WM_STICKY_KEYS_H_ | 6 #define ASH_WM_STICKY_KEYS_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 // True if the received key event is sent by StickyKeyHandler. | 216 // True if the received key event is sent by StickyKeyHandler. |
217 bool event_from_myself_; | 217 bool event_from_myself_; |
218 | 218 |
219 // True if we received the TARGET_MODIFIER_DOWN event while in the DISABLED | 219 // True if we received the TARGET_MODIFIER_DOWN event while in the DISABLED |
220 // state but before we receive the TARGET_MODIFIER_UP event. Normal | 220 // state but before we receive the TARGET_MODIFIER_UP event. Normal |
221 // shortcuts (eg. ctrl + t) during this time will prevent a transition to | 221 // shortcuts (eg. ctrl + t) during this time will prevent a transition to |
222 // the ENABLED state. | 222 // the ENABLED state. |
223 bool preparing_to_enable_; | 223 bool preparing_to_enable_; |
224 | 224 |
| 225 // Tracks the scroll direction of the current scroll sequence. Sticky keys |
| 226 // stops modifying the scroll events of the sequence when the direction |
| 227 // changes. If no sequence is tracked, the value is 0. |
| 228 int scroll_delta_; |
| 229 |
225 // The modifier up key event to be sent on non modifier key on ENABLED state. | 230 // The modifier up key event to be sent on non modifier key on ENABLED state. |
226 scoped_ptr<ui::KeyEvent> modifier_up_event_; | 231 scoped_ptr<ui::KeyEvent> modifier_up_event_; |
227 | 232 |
228 scoped_ptr<StickyKeysHandlerDelegate> delegate_; | 233 scoped_ptr<StickyKeysHandlerDelegate> delegate_; |
229 | 234 |
230 DISALLOW_COPY_AND_ASSIGN(StickyKeysHandler); | 235 DISALLOW_COPY_AND_ASSIGN(StickyKeysHandler); |
231 }; | 236 }; |
232 | 237 |
233 } // namespace ash | 238 } // namespace ash |
234 | 239 |
235 #endif // ASH_WM_STICKY_KEYS_H_ | 240 #endif // ASH_WM_STICKY_KEYS_H_ |
OLD | NEW |