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