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_TABLE_H_ | 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
6 #define ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 6 #define ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/base/events/event_constants.h" | 10 #include "ui/base/events/event_constants.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 // In particular, there is not an accelerator processing pass for Ash after | 38 // In particular, there is not an accelerator processing pass for Ash after |
39 // the browser gets the accelerator. See crbug.com/285308 for details. | 39 // the browser gets the accelerator. See crbug.com/285308 for details. |
40 // | 40 // |
41 // Please put if/def sections at the end of the bare section and keep the list | 41 // Please put if/def sections at the end of the bare section and keep the list |
42 // within each section in alphabetical order. | 42 // within each section in alphabetical order. |
43 enum AcceleratorAction { | 43 enum AcceleratorAction { |
44 ACCESSIBLE_FOCUS_NEXT, | 44 ACCESSIBLE_FOCUS_NEXT, |
45 ACCESSIBLE_FOCUS_PREVIOUS, | 45 ACCESSIBLE_FOCUS_PREVIOUS, |
46 BRIGHTNESS_DOWN, | 46 BRIGHTNESS_DOWN, |
47 BRIGHTNESS_UP, | 47 BRIGHTNESS_UP, |
48 CYCLE_BACKWARD_LINEAR, | |
49 CYCLE_BACKWARD_MRU, | 48 CYCLE_BACKWARD_MRU, |
50 CYCLE_FORWARD_LINEAR, | |
51 CYCLE_FORWARD_MRU, | 49 CYCLE_FORWARD_MRU, |
50 CYCLE_LINEAR, | |
52 DEBUG_TOGGLE_DEVICE_SCALE_FACTOR, | 51 DEBUG_TOGGLE_DEVICE_SCALE_FACTOR, |
53 DEBUG_TOGGLE_SHOW_DEBUG_BORDERS, | 52 DEBUG_TOGGLE_SHOW_DEBUG_BORDERS, |
54 DEBUG_TOGGLE_SHOW_FPS_COUNTER, | 53 DEBUG_TOGGLE_SHOW_FPS_COUNTER, |
55 DEBUG_TOGGLE_SHOW_PAINT_RECTS, | 54 DEBUG_TOGGLE_SHOW_PAINT_RECTS, |
56 DISABLE_CAPS_LOCK, | 55 DISABLE_CAPS_LOCK, |
57 EXIT, | 56 EXIT, |
58 FOCUS_LAUNCHER, | 57 FOCUS_LAUNCHER, |
59 FOCUS_NEXT_PANE, | 58 FOCUS_NEXT_PANE, |
60 FOCUS_PREVIOUS_PANE, | 59 FOCUS_PREVIOUS_PANE, |
61 KEYBOARD_BRIGHTNESS_DOWN, | 60 KEYBOARD_BRIGHTNESS_DOWN, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 | 135 |
137 struct AcceleratorData { | 136 struct AcceleratorData { |
138 bool trigger_on_press; | 137 bool trigger_on_press; |
139 ui::KeyboardCode keycode; | 138 ui::KeyboardCode keycode; |
140 int modifiers; | 139 int modifiers; |
141 AcceleratorAction action; | 140 AcceleratorAction action; |
142 }; | 141 }; |
143 | 142 |
144 // Accelerators handled by AcceleratorController. | 143 // Accelerators handled by AcceleratorController. |
145 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; | 144 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; |
146 | |
147 // The number of elements in kAcceleratorData. | |
James Cook
2013/09/04 23:16:46
While working on an earlier CL I found these comme
| |
148 ASH_EXPORT extern const size_t kAcceleratorDataLength; | 145 ASH_EXPORT extern const size_t kAcceleratorDataLength; |
149 | 146 |
150 #if !defined(NDEBUG) | 147 #if !defined(NDEBUG) |
151 // Accelerators useful when running on desktop. Debug build only. | 148 // Accelerators useful when running on desktop. Debug build only. |
152 ASH_EXPORT extern const AcceleratorData kDesktopAcceleratorData[]; | 149 ASH_EXPORT extern const AcceleratorData kDesktopAcceleratorData[]; |
153 | |
154 // The number of elements in kDesktopAcceleratorData. | |
155 ASH_EXPORT extern const size_t kDesktopAcceleratorDataLength; | 150 ASH_EXPORT extern const size_t kDesktopAcceleratorDataLength; |
156 #endif | 151 #endif |
157 | 152 |
158 // Debug accelerators enabled only when "Debugging keyboard shortcuts" flag | 153 // Debug accelerators enabled only when "Debugging keyboard shortcuts" flag |
159 // (--ash-debug-shortcuts) is enabled. | 154 // (--ash-debug-shortcuts) is enabled. |
160 ASH_EXPORT extern const AcceleratorData kDebugAcceleratorData[]; | 155 ASH_EXPORT extern const AcceleratorData kDebugAcceleratorData[]; |
161 | |
162 // The number of elements in kDebugAcceleratorData. | |
163 ASH_EXPORT extern const size_t kDebugAcceleratorDataLength; | 156 ASH_EXPORT extern const size_t kDebugAcceleratorDataLength; |
164 | 157 |
165 // Actions that should be handled very early in Ash unless the current target | 158 // Actions that should be handled very early in Ash unless the current target |
166 // window is full-screen. | 159 // window is full-screen. |
167 ASH_EXPORT extern const AcceleratorAction kReservedActions[]; | 160 ASH_EXPORT extern const AcceleratorAction kReservedActions[]; |
168 | |
169 // The number of elements in kReservedActions. | |
170 ASH_EXPORT extern const size_t kReservedActionsLength; | 161 ASH_EXPORT extern const size_t kReservedActionsLength; |
171 | 162 |
172 // Actions that should be handled very early in Ash unless the current target | 163 // Actions that should be handled very early in Ash unless the current target |
173 // window is full-screen, these actions are only handled if | 164 // window is full-screen, these actions are only handled if |
174 // DebugShortcutsEnabled is true (command line switch 'ash-debug-shortcuts'). | 165 // DebugShortcutsEnabled is true (command line switch 'ash-debug-shortcuts'). |
175 ASH_EXPORT extern const AcceleratorAction kReservedDebugActions[]; | 166 ASH_EXPORT extern const AcceleratorAction kReservedDebugActions[]; |
176 | |
177 // The number of elements in kReservedDebugActions. | |
178 ASH_EXPORT extern const size_t kReservedDebugActionsLength; | 167 ASH_EXPORT extern const size_t kReservedDebugActionsLength; |
179 | 168 |
180 // Actions allowed while user is not signed in or screen is locked. | 169 // Actions allowed while user is not signed in or screen is locked. |
181 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[]; | 170 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[]; |
182 | |
183 // The number of elements in kActionsAllowedAtLoginOrLockScreen. | |
184 ASH_EXPORT extern const size_t kActionsAllowedAtLoginOrLockScreenLength; | 171 ASH_EXPORT extern const size_t kActionsAllowedAtLoginOrLockScreenLength; |
185 | 172 |
186 // Actions allowed while screen is locked (in addition to | 173 // Actions allowed while screen is locked (in addition to |
187 // kActionsAllowedAtLoginOrLockScreen). | 174 // kActionsAllowedAtLoginOrLockScreen). |
188 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[]; | 175 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[]; |
189 | |
190 // The number of elements in kActionsAllowedAtLockScreen. | |
191 ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength; | 176 ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength; |
192 | 177 |
193 // Actions allowed while a modal window is up. | 178 // Actions allowed while a modal window is up. |
194 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtModalWindow[]; | 179 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtModalWindow[]; |
195 | |
196 // The number of elements in kActionsAllowedAtModalWindow. | |
197 ASH_EXPORT extern const size_t kActionsAllowedAtModalWindowLength; | 180 ASH_EXPORT extern const size_t kActionsAllowedAtModalWindowLength; |
198 | 181 |
199 // Actions which will not be repeated while holding an accelerator key. | 182 // Actions which will not be repeated while holding an accelerator key. |
200 ASH_EXPORT extern const AcceleratorAction kNonrepeatableActions[]; | 183 ASH_EXPORT extern const AcceleratorAction kNonrepeatableActions[]; |
201 | |
202 // The number of elements in kNonrepeatableActions. | |
203 ASH_EXPORT extern const size_t kNonrepeatableActionsLength; | 184 ASH_EXPORT extern const size_t kNonrepeatableActionsLength; |
204 | 185 |
205 // Actions allowed in app mode. | 186 // Actions allowed in app mode. |
206 ASH_EXPORT extern const AcceleratorAction kActionsAllowedInAppMode[]; | 187 ASH_EXPORT extern const AcceleratorAction kActionsAllowedInAppMode[]; |
207 | |
208 // The number of elements in kActionsAllowedInAppMode. | |
209 ASH_EXPORT extern const size_t kActionsAllowedInAppModeLength; | 188 ASH_EXPORT extern const size_t kActionsAllowedInAppModeLength; |
210 | 189 |
211 } // namespace ash | 190 } // namespace ash |
212 | 191 |
213 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 192 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
OLD | NEW |