| 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_ |
| 6 #define ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 6 #define ASH_ACCELERATORS_ACTION_TABLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | |
| 10 #include "ui/aura/event.h" | |
| 11 | |
| 12 namespace ash { | 9 namespace ash { |
| 13 | 10 |
| 14 // Please put if/def sections at the end of the bare section and keep the list | 11 // Please put if/def sections at the end of the bare section and keep the list |
| 15 // within each section in alphabetical order. | 12 // within each section in alphabetical order. |
| 16 enum AcceleratorAction { | 13 enum AcceleratorAction { |
| 17 BRIGHTNESS_DOWN, | 14 BRIGHTNESS_DOWN, |
| 18 BRIGHTNESS_UP, | 15 BRIGHTNESS_UP, |
| 19 CYCLE_BACKWARD_LINEAR, | 16 CYCLE_BACKWARD_LINEAR, |
| 20 CYCLE_BACKWARD_MRU, | 17 CYCLE_BACKWARD_MRU, |
| 21 CYCLE_FORWARD_LINEAR, | 18 CYCLE_FORWARD_LINEAR, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 DISPLAY_TOGGLE_SCALE, | 69 DISPLAY_TOGGLE_SCALE, |
| 73 ROTATE_SCREEN, | 70 ROTATE_SCREEN, |
| 74 TOGGLE_DESKTOP_BACKGROUND_MODE, | 71 TOGGLE_DESKTOP_BACKGROUND_MODE, |
| 75 TOGGLE_ROOT_WINDOW_FULL_SCREEN, | 72 TOGGLE_ROOT_WINDOW_FULL_SCREEN, |
| 76 #if !defined(NDEBUG) | 73 #if !defined(NDEBUG) |
| 77 PRINT_LAYER_HIERARCHY, | 74 PRINT_LAYER_HIERARCHY, |
| 78 PRINT_WINDOW_HIERARCHY, | 75 PRINT_WINDOW_HIERARCHY, |
| 79 #endif | 76 #endif |
| 80 }; | 77 }; |
| 81 | 78 |
| 82 struct AcceleratorData { | |
| 83 bool trigger_on_press; | |
| 84 ui::KeyboardCode keycode; | |
| 85 int modifiers; | |
| 86 AcceleratorAction action; | |
| 87 }; | |
| 88 | |
| 89 // Accelerators handled by AcceleratorController. | |
| 90 ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; | |
| 91 | |
| 92 // The number of elements in kAcceleratorData. | |
| 93 ASH_EXPORT extern const size_t kAcceleratorDataLength; | |
| 94 | |
| 95 // Actions that should be handled very early in Ash unless the current target | |
| 96 // window is full-screen. | |
| 97 ASH_EXPORT extern const AcceleratorAction kReservedActions[]; | |
| 98 | |
| 99 // The number of elements in kReservedActions. | |
| 100 ASH_EXPORT extern const size_t kReservedActionsLength; | |
| 101 | |
| 102 // Actions allowed while user is not signed in or screen is locked. | |
| 103 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[]; | |
| 104 | |
| 105 // The number of elements in kActionsAllowedAtLoginOrLockScreen. | |
| 106 ASH_EXPORT extern const size_t kActionsAllowedAtLoginOrLockScreenLength; | |
| 107 | |
| 108 // Actions allowed while screen is locked (in addition to | |
| 109 // kActionsAllowedAtLoginOrLockScreen). | |
| 110 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[]; | |
| 111 | |
| 112 // The number of elements in kActionsAllowedAtLockScreen. | |
| 113 ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength; | |
| 114 | |
| 115 } // namespace ash | 79 } // namespace ash |
| 116 | 80 |
| 117 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 81 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
| OLD | NEW |