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_ACTION_TABLE_H_ |
|
sky
2012/08/02 20:14:39
Should match file name.
qfel
2012/08/07 09:23:15
Done.
| |
| 6 #define ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 6 #define ASH_ACCELERATORS_ACTION_TABLE_H_ |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "ui/aura/event.h" | |
| 10 | 7 |
| 11 namespace ash { | 8 namespace ash { |
| 12 | 9 |
| 13 // Please put if/def sections at the end of the bare section and keep the list | 10 // Please put if/def sections at the end of the bare section and keep the list |
| 14 // within each section in alphabetical order. | 11 // within each section in alphabetical order. |
| 15 enum AcceleratorAction { | 12 enum AcceleratorAction { |
| 16 BRIGHTNESS_DOWN, | 13 BRIGHTNESS_DOWN, |
| 17 BRIGHTNESS_UP, | 14 BRIGHTNESS_UP, |
| 18 CYCLE_BACKWARD_LINEAR, | 15 CYCLE_BACKWARD_LINEAR, |
| 19 CYCLE_BACKWARD_MRU, | 16 CYCLE_BACKWARD_MRU, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 TOGGLE_ROOT_WINDOW_FULL_SCREEN, | 59 TOGGLE_ROOT_WINDOW_FULL_SCREEN, |
| 63 TOGGLE_SPOKEN_FEEDBACK, | 60 TOGGLE_SPOKEN_FEEDBACK, |
| 64 VOLUME_DOWN, | 61 VOLUME_DOWN, |
| 65 VOLUME_MUTE, | 62 VOLUME_MUTE, |
| 66 VOLUME_UP, | 63 VOLUME_UP, |
| 67 WINDOW_MAXIMIZE_RESTORE, | 64 WINDOW_MAXIMIZE_RESTORE, |
| 68 WINDOW_MINIMIZE, | 65 WINDOW_MINIMIZE, |
| 69 WINDOW_POSITION_CENTER, | 66 WINDOW_POSITION_CENTER, |
| 70 WINDOW_SNAP_LEFT, | 67 WINDOW_SNAP_LEFT, |
| 71 WINDOW_SNAP_RIGHT, | 68 WINDOW_SNAP_RIGHT, |
| 72 #if defined(OS_CHROMEOS) | |
| 73 CYCLE_DISPLAY_MODE, | 69 CYCLE_DISPLAY_MODE, |
| 74 LOCK_SCREEN, | 70 LOCK_SCREEN, |
| 75 OPEN_CROSH, | 71 OPEN_CROSH, |
| 76 OPEN_FILE_MANAGER_DIALOG, | 72 OPEN_FILE_MANAGER_DIALOG, |
| 77 OPEN_FILE_MANAGER_TAB, | 73 OPEN_FILE_MANAGER_TAB, |
| 78 #endif | |
| 79 #if !defined(NDEBUG) | |
| 80 PRINT_LAYER_HIERARCHY, | 74 PRINT_LAYER_HIERARCHY, |
| 81 PRINT_VIEW_HIERARCHY, | 75 PRINT_VIEW_HIERARCHY, |
| 82 PRINT_WINDOW_HIERARCHY, | 76 PRINT_WINDOW_HIERARCHY, |
| 83 #endif | |
| 84 }; | 77 }; |
| 85 | 78 |
| 86 struct AcceleratorData { | |
| 87 bool trigger_on_press; | |
| 88 ui::KeyboardCode keycode; | |
| 89 int modifiers; | |
| 90 AcceleratorAction action; | |
| 91 }; | |
| 92 | |
| 93 // Accelerators handled by AcceleratorController. | |
| 94 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; | |
| 95 | |
| 96 // The number of elements in kAcceleratorData. | |
| 97 ASH_EXPORT extern const size_t kAcceleratorDataLength; | |
| 98 | |
| 99 // Debug accelerators enabled only when "Debugging keyboard shortcuts" flag | |
| 100 // (--ash-debug-shortcuts) is enabled. | |
| 101 ASH_EXPORT extern const AcceleratorData kDebugAcceleratorData[]; | |
| 102 | |
| 103 // The number of elements in kDebugAcceleratorData. | |
| 104 ASH_EXPORT extern const size_t kDebugAcceleratorDataLength; | |
| 105 | |
| 106 // Actions that should be handled very early in Ash unless the current target | |
| 107 // window is full-screen. | |
| 108 ASH_EXPORT extern const AcceleratorAction kReservedActions[]; | |
| 109 | |
| 110 // The number of elements in kReservedActions. | |
| 111 ASH_EXPORT extern const size_t kReservedActionsLength; | |
| 112 | |
| 113 // Actions allowed while user is not signed in or screen is locked. | |
| 114 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[]; | |
| 115 | |
| 116 // The number of elements in kActionsAllowedAtLoginOrLockScreen. | |
| 117 ASH_EXPORT extern const size_t kActionsAllowedAtLoginOrLockScreenLength; | |
| 118 | |
| 119 // Actions allowed while screen is locked (in addition to | |
| 120 // kActionsAllowedAtLoginOrLockScreen). | |
| 121 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[]; | |
| 122 | |
| 123 // The number of elements in kActionsAllowedAtLockScreen. | |
| 124 ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength; | |
| 125 | |
| 126 } // namespace ash | 79 } // namespace ash |
| 127 | 80 |
| 128 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 81 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
| OLD | NEW |