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 // This class describe a keyboard accelerator (or keyboard shortcut). | 5 // This class describe a keyboard accelerator (or keyboard shortcut). |
6 // Keyboard accelerators are registered with the FocusManager. | 6 // Keyboard accelerators are registered with the FocusManager. |
7 // It has a copy constructor and assignment operator so that it can be copied. | 7 // It has a copy constructor and assignment operator so that it can be copied. |
8 // It also defines the < operator so that it can be used as a key in a std::map. | 8 // It also defines the < operator so that it can be used as a key in a std::map. |
9 // | 9 // |
10 | 10 |
11 #ifndef UI_BASE_ACCELERATORS_ACCELERATOR_H_ | 11 #ifndef UI_BASE_ACCELERATORS_ACCELERATOR_H_ |
12 #define UI_BASE_ACCELERATORS_ACCELERATOR_H_ | 12 #define UI_BASE_ACCELERATORS_ACCELERATOR_H_ |
13 | 13 |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "ui/base/accelerators/platform_accelerator.h" | 16 #include "ui/base/accelerators/platform_accelerator.h" |
17 #include "ui/base/events/event_constants.h" | 17 #include "ui/base/events/event_constants.h" |
18 #include "ui/base/keycodes/keyboard_codes.h" | 18 #include "ui/base/keycodes/keyboard_codes.h" |
19 #include "ui/base/ui_export.h" | 19 #include "ui/base/ui_export.h" |
20 | 20 |
21 namespace ui { | 21 namespace ui { |
22 | 22 |
23 class PlatformAccelerator; | 23 class PlatformAccelerator; |
24 | 24 |
25 // This is a cross-platform class for accelerator keys used in menus. | 25 // This is a cross-platform class for accelerator keys used in menus. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual bool GetAcceleratorForCommandId(int command_id, | 108 virtual bool GetAcceleratorForCommandId(int command_id, |
109 ui::Accelerator* accelerator) = 0; | 109 ui::Accelerator* accelerator) = 0; |
110 | 110 |
111 protected: | 111 protected: |
112 virtual ~AcceleratorProvider() {} | 112 virtual ~AcceleratorProvider() {} |
113 }; | 113 }; |
114 | 114 |
115 } // namespace ui | 115 } // namespace ui |
116 | 116 |
117 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_H_ | 117 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_H_ |
OLD | NEW |