OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_MENUS_ACCELERATOR_H_ | 5 #ifndef APP_MENUS_ACCELERATOR_H_ |
6 #define APP_MENUS_ACCELERATOR_H_ | 6 #define APP_MENUS_ACCELERATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/keyboard_codes.h" | 9 #include "base/keyboard_codes.h" |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 } | 61 } |
62 | 62 |
63 protected: | 63 protected: |
64 // The keycode (VK_...). | 64 // The keycode (VK_...). |
65 base::KeyboardCode key_code_; | 65 base::KeyboardCode key_code_; |
66 | 66 |
67 // The state of the Shift/Ctrl/Alt keys (platform-dependent). | 67 // The state of the Shift/Ctrl/Alt keys (platform-dependent). |
68 int modifiers_; | 68 int modifiers_; |
69 }; | 69 }; |
70 | 70 |
71 // Since acclerator code is one of the few things that can't be cross platform | |
72 // in the chrome UI, separate out just the GetAcceleratorForCommandId() from | |
73 // the menu delegates. | |
74 class AcceleratorProvider { | |
75 public: | |
76 // Gets the accelerator for the specified command id. Returns true if the | |
77 // command id has a valid accelerator, false otherwise. | |
78 virtual bool GetAcceleratorForCommandId( | |
79 int command_id, | |
80 menus::Accelerator* accelerator) = 0; | |
81 }; | |
sky
2010/08/23 21:55:59
virtual protected destructor?
| |
82 | |
71 } | 83 } |
72 | 84 |
73 #endif // APP_MENUS_ACCELERATOR_H_ | 85 #endif // APP_MENUS_ACCELERATOR_H_ |
74 | 86 |
OLD | NEW |