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" |
11 #include "ui/base/keycodes/keyboard_codes.h" | 11 #include "ui/base/keycodes/keyboard_codes.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 | 14 |
15 // Please put if/def sections at the end of the bare section and keep the list | 15 // Please put if/def sections at the end of the bare section and keep the list |
16 // within each section in alphabetical order. | 16 // within each section in alphabetical order. |
17 enum AcceleratorAction { | 17 enum AcceleratorAction { |
18 BRIGHTNESS_DOWN, | 18 BRIGHTNESS_DOWN, |
19 BRIGHTNESS_UP, | 19 BRIGHTNESS_UP, |
20 CYCLE_BACKWARD_LINEAR, | 20 CYCLE_BACKWARD_LINEAR, |
21 CYCLE_BACKWARD_MRU, | 21 CYCLE_BACKWARD_MRU, |
22 CYCLE_FORWARD_LINEAR, | 22 CYCLE_FORWARD_LINEAR, |
23 CYCLE_FORWARD_MRU, | 23 CYCLE_FORWARD_MRU, |
24 DEBUG_TOGGLE_DEVICE_SCALE_FACTOR, | |
25 DEBUG_TOGGLE_SHOW_DEBUG_BORDERS, | |
26 DEBUG_TOGGLE_SHOW_FPS_COUNTER, | |
27 DEBUG_TOGGLE_SHOW_PAINT_RECTS, | |
24 DISABLE_CAPS_LOCK, | 28 DISABLE_CAPS_LOCK, |
25 DISPLAY_TOGGLE_SCALE, | |
26 EXIT, | 29 EXIT, |
27 FOCUS_LAUNCHER, | 30 FOCUS_LAUNCHER, |
28 FOCUS_NEXT_PANE, | 31 FOCUS_NEXT_PANE, |
29 FOCUS_PREVIOUS_PANE, | 32 FOCUS_PREVIOUS_PANE, |
30 KEYBOARD_BRIGHTNESS_DOWN, | 33 KEYBOARD_BRIGHTNESS_DOWN, |
31 KEYBOARD_BRIGHTNESS_UP, | 34 KEYBOARD_BRIGHTNESS_UP, |
32 LOCK_PRESSED, | 35 LOCK_PRESSED, |
33 LOCK_RELEASED, | 36 LOCK_RELEASED, |
34 MAGNIFY_SCREEN_ZOOM_IN, | 37 MAGNIFY_SCREEN_ZOOM_IN, |
35 MAGNIFY_SCREEN_ZOOM_OUT, | 38 MAGNIFY_SCREEN_ZOOM_OUT, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 WINDOW_SNAP_LEFT, | 90 WINDOW_SNAP_LEFT, |
88 WINDOW_SNAP_RIGHT, | 91 WINDOW_SNAP_RIGHT, |
89 #if defined(OS_CHROMEOS) | 92 #if defined(OS_CHROMEOS) |
90 CYCLE_DISPLAY_MODE, | 93 CYCLE_DISPLAY_MODE, |
91 LOCK_SCREEN, | 94 LOCK_SCREEN, |
92 OPEN_CROSH, | 95 OPEN_CROSH, |
93 OPEN_FILE_DIALOG, // Open 'Open file' dialog. | 96 OPEN_FILE_DIALOG, // Open 'Open file' dialog. |
94 OPEN_FILE_MANAGER, | 97 OPEN_FILE_MANAGER, |
95 DISABLE_GPU_WATCHDOG, | 98 DISABLE_GPU_WATCHDOG, |
96 #endif | 99 #endif |
97 #if !defined(NDEBUG) | |
98 PRINT_LAYER_HIERARCHY, | 100 PRINT_LAYER_HIERARCHY, |
99 PRINT_VIEW_HIERARCHY, | 101 PRINT_VIEW_HIERARCHY, |
100 PRINT_WINDOW_HIERARCHY, | 102 PRINT_WINDOW_HIERARCHY, |
101 #endif | |
102 }; | 103 }; |
103 | 104 |
104 struct AcceleratorData { | 105 struct AcceleratorData { |
105 bool trigger_on_press; | 106 bool trigger_on_press; |
106 ui::KeyboardCode keycode; | 107 ui::KeyboardCode keycode; |
107 int modifiers; | 108 int modifiers; |
108 AcceleratorAction action; | 109 AcceleratorAction action; |
109 }; | 110 }; |
110 | 111 |
111 // Accelerators handled by AcceleratorController. | 112 // Accelerators handled by AcceleratorController. |
112 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; | 113 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; |
113 | 114 |
114 // The number of elements in kAcceleratorData. | 115 // The number of elements in kAcceleratorData. |
115 ASH_EXPORT extern const size_t kAcceleratorDataLength; | 116 ASH_EXPORT extern const size_t kAcceleratorDataLength; |
116 | 117 |
118 #if !defined(NDEBUG) | |
119 // Debug accelerators enabled only on debug build. | |
James Cook
2013/04/22 21:51:58
Debug build? Or desktop build?
oshima
2013/04/22 23:07:40
updated the comment.
| |
120 ASH_EXPORT extern const AcceleratorData kDesktopAcceleratorData[]; | |
121 | |
122 // The number of elements in kDesktopAcceleratorData. | |
123 ASH_EXPORT extern const size_t kDesktopAcceleratorDataLength; | |
124 #endif | |
125 | |
117 // Debug accelerators enabled only when "Debugging keyboard shortcuts" flag | 126 // Debug accelerators enabled only when "Debugging keyboard shortcuts" flag |
118 // (--ash-debug-shortcuts) is enabled. | 127 // (--ash-debug-shortcuts) is enabled. |
119 ASH_EXPORT extern const AcceleratorData kDebugAcceleratorData[]; | 128 ASH_EXPORT extern const AcceleratorData kDebugAcceleratorData[]; |
120 | 129 |
121 // The number of elements in kDebugAcceleratorData. | 130 // The number of elements in kDebugAcceleratorData. |
122 ASH_EXPORT extern const size_t kDebugAcceleratorDataLength; | 131 ASH_EXPORT extern const size_t kDebugAcceleratorDataLength; |
123 | 132 |
124 // Actions that should be handled very early in Ash unless the current target | 133 // Actions that should be handled very early in Ash unless the current target |
125 // window is full-screen. | 134 // window is full-screen. |
126 ASH_EXPORT extern const AcceleratorAction kReservedActions[]; | 135 ASH_EXPORT extern const AcceleratorAction kReservedActions[]; |
(...skipping 28 matching lines...) Expand all Loading... | |
155 | 164 |
156 // Actions allowed in app mode. | 165 // Actions allowed in app mode. |
157 ASH_EXPORT extern const AcceleratorAction kActionsAllowedInAppMode[]; | 166 ASH_EXPORT extern const AcceleratorAction kActionsAllowedInAppMode[]; |
158 | 167 |
159 // The number of elements in kActionsAllowedInAppMode. | 168 // The number of elements in kActionsAllowedInAppMode. |
160 ASH_EXPORT extern const size_t kActionsAllowedInAppModeLength; | 169 ASH_EXPORT extern const size_t kActionsAllowedInAppModeLength; |
161 | 170 |
162 } // namespace ash | 171 } // namespace ash |
163 | 172 |
164 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 173 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
OLD | NEW |