OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ | 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ |
6 #define ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ | 6 #define ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 126 } |
127 | 127 |
128 // Overridden from ui::AcceleratorTarget: | 128 // Overridden from ui::AcceleratorTarget: |
129 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 129 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
130 bool CanHandleAccelerators() const override; | 130 bool CanHandleAccelerators() const override; |
131 | 131 |
132 private: | 132 private: |
133 FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, GlobalAccelerators); | 133 FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, GlobalAccelerators); |
134 FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, | 134 FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, |
135 DontRepeatToggleFullscreen); | 135 DontRepeatToggleFullscreen); |
| 136 FRIEND_TEST_ALL_PREFIXES(DeprecatedAcceleratorTester, |
| 137 TestDeprecatedAcceleratorsBehavior); |
136 | 138 |
137 // Initializes the accelerators this class handles as a target. | 139 // Initializes the accelerators this class handles as a target. |
138 void Init(); | 140 void Init(); |
139 | 141 |
140 // Registers the specified accelerators. | 142 // Registers the specified accelerators. |
141 void RegisterAccelerators(const AcceleratorData accelerators[], | 143 void RegisterAccelerators(const AcceleratorData accelerators[], |
142 size_t accelerators_length); | 144 size_t accelerators_length); |
143 | 145 |
144 // Registers the deprecated accelerators and their replacing new ones. | 146 // Registers the deprecated accelerators and their replacing new ones. |
145 void RegisterDeprecatedAccelerators(); | 147 void RegisterDeprecatedAccelerators(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 std::set<int> actions_needing_window_; | 211 std::set<int> actions_needing_window_; |
210 // Actions that can be performed without closing the menu (if one is present). | 212 // Actions that can be performed without closing the menu (if one is present). |
211 std::set<int> actions_keeping_menu_open_; | 213 std::set<int> actions_keeping_menu_open_; |
212 | 214 |
213 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); | 215 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); |
214 }; | 216 }; |
215 | 217 |
216 } // namespace ash | 218 } // namespace ash |
217 | 219 |
218 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ | 220 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ |
OLD | NEW |