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 "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 // There are four classes of accelerators in Ash: |
| 16 // |
| 17 // Ash (OS) reserved: |
| 18 // * Neither packaged apps nor web pages can cancel. |
| 19 // * For example, Alt-Tab window cycling. |
| 20 // * See kReservedActions below. |
| 21 // |
| 22 // Ash (OS) non-reserved: |
| 23 // * Packaged apps can cancel but web pages cannot. |
| 24 // * For example, volume up and down. |
| 25 // * See kActionsAllowedInAppMode below. |
| 26 // |
| 27 // Browser reserved: |
| 28 // * Packaged apps can cancel but web pages cannot. |
| 29 // * For example, browser back and forward from first-row function keys. |
| 30 // * See IsReservedCommandOrKey() in |
| 31 // chrome/browser/ui/browser_command_controller.cc. |
| 32 // |
| 33 // Browser non-reserved: |
| 34 // * Both packaged apps and web pages can cancel. |
| 35 // * For example, selecting tabs by number with Ctrl-1 to Ctrl-9. |
| 36 // * See kAcceleratorMap in chrome/browser/ui/views/accelerator_table.cc. |
| 37 // |
| 38 // In particular, there is not an accelerator processing pass for Ash after |
| 39 // the browser gets the accelerator. See crbug.com/285308 for details. |
| 40 // |
15 // Please put if/def sections at the end of the bare section and keep the list | 41 // Please put if/def sections at the end of the bare section and keep the list |
16 // within each section in alphabetical order. | 42 // within each section in alphabetical order. |
17 enum AcceleratorAction { | 43 enum AcceleratorAction { |
18 ACCESSIBLE_FOCUS_NEXT, | 44 ACCESSIBLE_FOCUS_NEXT, |
19 ACCESSIBLE_FOCUS_PREVIOUS, | 45 ACCESSIBLE_FOCUS_PREVIOUS, |
20 BRIGHTNESS_DOWN, | 46 BRIGHTNESS_DOWN, |
21 BRIGHTNESS_UP, | 47 BRIGHTNESS_UP, |
22 CYCLE_BACKWARD_LINEAR, | 48 CYCLE_BACKWARD_LINEAR, |
23 CYCLE_BACKWARD_MRU, | 49 CYCLE_BACKWARD_MRU, |
24 CYCLE_FORWARD_LINEAR, | 50 CYCLE_FORWARD_LINEAR, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 204 |
179 // Actions allowed in app mode. | 205 // Actions allowed in app mode. |
180 ASH_EXPORT extern const AcceleratorAction kActionsAllowedInAppMode[]; | 206 ASH_EXPORT extern const AcceleratorAction kActionsAllowedInAppMode[]; |
181 | 207 |
182 // The number of elements in kActionsAllowedInAppMode. | 208 // The number of elements in kActionsAllowedInAppMode. |
183 ASH_EXPORT extern const size_t kActionsAllowedInAppModeLength; | 209 ASH_EXPORT extern const size_t kActionsAllowedInAppModeLength; |
184 | 210 |
185 } // namespace ash | 211 } // namespace ash |
186 | 212 |
187 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ | 213 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_ |
OLD | NEW |