OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_ | 5 #ifndef UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_ |
6 #define UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_ | 6 #define UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // Returns the most recent previously recorded accelerator that is different | 28 // Returns the most recent previously recorded accelerator that is different |
29 // than the current. | 29 // than the current. |
30 const Accelerator& previous_accelerator() const { | 30 const Accelerator& previous_accelerator() const { |
31 return previous_accelerator_; | 31 return previous_accelerator_; |
32 } | 32 } |
33 | 33 |
34 // Stores the given |accelerator| only if it's different than the currently | 34 // Stores the given |accelerator| only if it's different than the currently |
35 // stored one. | 35 // stored one. |
36 void StoreCurrentAccelerator(const Accelerator& accelerator); | 36 void StoreCurrentAccelerator(const Accelerator& accelerator); |
37 | 37 |
| 38 void InterruptCurrentAccelerator(); |
| 39 |
38 private: | 40 private: |
39 Accelerator current_accelerator_; | 41 Accelerator current_accelerator_; |
40 Accelerator previous_accelerator_; | 42 Accelerator previous_accelerator_; |
41 | 43 |
42 std::set<KeyboardCode> currently_pressed_keys_; | 44 std::set<KeyboardCode> currently_pressed_keys_; |
43 | 45 |
44 DISALLOW_COPY_AND_ASSIGN(AcceleratorHistory); | 46 DISALLOW_COPY_AND_ASSIGN(AcceleratorHistory); |
45 }; | 47 }; |
46 | 48 |
47 }; // namespace ui | 49 }; // namespace ui |
48 | 50 |
49 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_ | 51 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_ |
OLD | NEW |