Chromium Code Reviews| 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 "ui/aura/event.h" | 9 #include "ui/aura/event.h" |
| 10 | 10 |
| 11 // Used to inclulde AcceleratorAction definition which originally was here. | |
|
sky
2012/08/02 20:14:39
There is no reason to specially comment this inclu
qfel
2012/08/07 09:23:15
Done.
| |
| 12 #include "ash/accelerators/accelerator_action.h" | |
| 13 | |
| 11 namespace ash { | 14 namespace ash { |
| 12 | 15 |
| 13 // Please put if/def sections at the end of the bare section and keep the list | |
| 14 // within each section in alphabetical order. | |
| 15 enum AcceleratorAction { | |
| 16 BRIGHTNESS_DOWN, | |
| 17 BRIGHTNESS_UP, | |
| 18 CYCLE_BACKWARD_LINEAR, | |
| 19 CYCLE_BACKWARD_MRU, | |
| 20 CYCLE_FORWARD_LINEAR, | |
| 21 CYCLE_FORWARD_MRU, | |
| 22 DISPLAY_ADD_REMOVE, | |
| 23 DISPLAY_CYCLE, | |
| 24 DISPLAY_TOGGLE_SCALE, | |
| 25 EXIT, | |
| 26 FOCUS_LAUNCHER, | |
| 27 FOCUS_NEXT_PANE, | |
| 28 FOCUS_PREVIOUS_PANE, | |
| 29 FOCUS_SYSTEM_TRAY, | |
| 30 KEYBOARD_BRIGHTNESS_DOWN, | |
| 31 KEYBOARD_BRIGHTNESS_UP, | |
| 32 MAGNIFY_SCREEN_ZOOM_IN, | |
| 33 MAGNIFY_SCREEN_ZOOM_OUT, | |
| 34 NEW_INCOGNITO_WINDOW, | |
| 35 NEW_TAB, | |
| 36 NEW_WINDOW, | |
| 37 NEXT_IME, | |
| 38 OPEN_FEEDBACK_PAGE, | |
| 39 PREVIOUS_IME, | |
| 40 RESTORE_TAB, | |
| 41 ROTATE_SCREEN, | |
| 42 ROTATE_WINDOWS, | |
| 43 SELECT_LAST_WIN, | |
| 44 SELECT_WIN_0, | |
| 45 SELECT_WIN_1, | |
| 46 SELECT_WIN_2, | |
| 47 SELECT_WIN_3, | |
| 48 SELECT_WIN_4, | |
| 49 SELECT_WIN_5, | |
| 50 SELECT_WIN_6, | |
| 51 SELECT_WIN_7, | |
| 52 SHOW_KEYBOARD_OVERLAY, | |
| 53 SHOW_OAK, | |
| 54 SHOW_TASK_MANAGER, | |
| 55 SWITCH_IME, // Switch to another IME depending on the accelerator. | |
| 56 TAKE_PARTIAL_SCREENSHOT, | |
| 57 TAKE_SCREENSHOT, // Control+F5 | |
| 58 TAKE_SCREENSHOT_BY_PRTSCN_KEY, // PrtScn | |
| 59 TOGGLE_APP_LIST, | |
| 60 TOGGLE_CAPS_LOCK, | |
| 61 TOGGLE_DESKTOP_BACKGROUND_MODE, | |
| 62 TOGGLE_ROOT_WINDOW_FULL_SCREEN, | |
| 63 TOGGLE_SPOKEN_FEEDBACK, | |
| 64 VOLUME_DOWN, | |
| 65 VOLUME_MUTE, | |
| 66 VOLUME_UP, | |
| 67 WINDOW_MAXIMIZE_RESTORE, | |
| 68 WINDOW_MINIMIZE, | |
| 69 WINDOW_POSITION_CENTER, | |
| 70 WINDOW_SNAP_LEFT, | |
| 71 WINDOW_SNAP_RIGHT, | |
| 72 #if defined(OS_CHROMEOS) | |
| 73 CYCLE_DISPLAY_MODE, | |
| 74 LOCK_SCREEN, | |
| 75 OPEN_CROSH, | |
| 76 OPEN_FILE_MANAGER_DIALOG, | |
| 77 OPEN_FILE_MANAGER_TAB, | |
| 78 #endif | |
| 79 #if !defined(NDEBUG) | |
| 80 PRINT_LAYER_HIERARCHY, | |
| 81 PRINT_VIEW_HIERARCHY, | |
| 82 PRINT_WINDOW_HIERARCHY, | |
| 83 #endif | |
| 84 }; | |
| 85 | |
| 86 struct AcceleratorData { | 16 struct AcceleratorData { |
| 87 bool trigger_on_press; | 17 bool trigger_on_press; |
| 88 ui::KeyboardCode keycode; | 18 ui::KeyboardCode keycode; |
| 89 int modifiers; | 19 int modifiers; |
| 90 AcceleratorAction action; | 20 AcceleratorAction action; |
| 91 }; | 21 }; |
| 92 | 22 |
| 93 // Accelerators handled by AcceleratorController. | 23 // Accelerators handled by AcceleratorController. |
| 94 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; | 24 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; |
| 95 | 25 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 119 // Actions allowed while screen is locked (in addition to | 49 // Actions allowed while screen is locked (in addition to |
| 120 // kActionsAllowedAtLoginOrLockScreen). | 50 // kActionsAllowedAtLoginOrLockScreen). |
| 121 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[]; | 51 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[]; |
| 122 | 52 |
| 123 // The number of elements in kActionsAllowedAtLockScreen. | 53 // The number of elements in kActionsAllowedAtLockScreen. |
| 124 ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength; | 54 ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength; |
| 125 | 55 |
| 126 } // namespace ash | 56 } // namespace ash |
| 127 | 57 |
| 128 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 58 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
| OLD | NEW |