Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: ash/accelerators/accelerator_table.h

Issue 14050009: Add debug shortcuts that toggles options to shows paint rects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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,
36 MEDIA_NEXT_TRACK, 39 MEDIA_NEXT_TRACK,
37 MEDIA_PLAY_PAUSE, 40 MEDIA_PLAY_PAUSE,
38 MEDIA_PREV_TRACK, 41 MEDIA_PREV_TRACK,
39 NEW_INCOGNITO_WINDOW, 42 NEW_INCOGNITO_WINDOW,
40 NEW_TAB, 43 NEW_TAB,
41 NEW_WINDOW, 44 NEW_WINDOW,
42 NEXT_IME, 45 NEXT_IME,
43 OPEN_FEEDBACK_PAGE, 46 OPEN_FEEDBACK_PAGE,
44 PREVIOUS_IME,
45 POWER_PRESSED, 47 POWER_PRESSED,
46 POWER_RELEASED, 48 POWER_RELEASED,
49 PREVIOUS_IME,
50 PRINT_LAYER_HIERARCHY,
47 PRINT_UI_HIERARCHIES, 51 PRINT_UI_HIERARCHIES,
52 PRINT_VIEW_HIERARCHY,
53 PRINT_WINDOW_HIERARCHY,
48 RESTORE_TAB, 54 RESTORE_TAB,
49 ROTATE_SCREEN, 55 ROTATE_SCREEN,
50 ROTATE_WINDOW, 56 ROTATE_WINDOW,
51 SCALE_UI_DOWN, 57 SCALE_UI_DOWN,
52 SCALE_UI_RESET, 58 SCALE_UI_RESET,
53 SCALE_UI_UP, 59 SCALE_UI_UP,
54 SELECT_LAST_WIN, 60 SELECT_LAST_WIN,
55 SELECT_WIN_0, 61 SELECT_WIN_0,
56 SELECT_WIN_1, 62 SELECT_WIN_1,
57 SELECT_WIN_2, 63 SELECT_WIN_2,
(...skipping 23 matching lines...) Expand all
81 TOUCH_HUD_MODE_CHANGE, 87 TOUCH_HUD_MODE_CHANGE,
82 VOLUME_DOWN, 88 VOLUME_DOWN,
83 VOLUME_MUTE, 89 VOLUME_MUTE,
84 VOLUME_UP, 90 VOLUME_UP,
85 WINDOW_MINIMIZE, 91 WINDOW_MINIMIZE,
86 WINDOW_POSITION_CENTER, 92 WINDOW_POSITION_CENTER,
87 WINDOW_SNAP_LEFT, 93 WINDOW_SNAP_LEFT,
88 WINDOW_SNAP_RIGHT, 94 WINDOW_SNAP_RIGHT,
89 #if defined(OS_CHROMEOS) 95 #if defined(OS_CHROMEOS)
90 CYCLE_DISPLAY_MODE, 96 CYCLE_DISPLAY_MODE,
97 DISABLE_GPU_WATCHDOG,
91 LOCK_SCREEN, 98 LOCK_SCREEN,
92 OPEN_CROSH, 99 OPEN_CROSH,
93 OPEN_FILE_DIALOG, // Open 'Open file' dialog. 100 OPEN_FILE_DIALOG, // Open 'Open file' dialog.
94 OPEN_FILE_MANAGER, 101 OPEN_FILE_MANAGER,
95 DISABLE_GPU_WATCHDOG,
96 #endif
97 #if !defined(NDEBUG)
98 PRINT_LAYER_HIERARCHY,
99 PRINT_VIEW_HIERARCHY,
100 PRINT_WINDOW_HIERARCHY,
101 #endif 102 #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 // Accelerators useful when running on desktop. Debug build only.
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698