Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: app/menus/accelerator.h

Issue 3163035: Revert "Clean up the WrenchMenuModel so that it uses SimpleMenu::Delegate." (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/cocoa/toolbar_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 virtual ~AcceleratorProvider() {}
77
78 // Gets the accelerator for the specified command id. Returns true if the
79 // command id has a valid accelerator, false otherwise.
80 virtual bool GetAcceleratorForCommandId(
81 int command_id,
82 menus::Accelerator* accelerator) = 0;
83 };
84
85 } 71 }
86 72
87 #endif // APP_MENUS_ACCELERATOR_H_ 73 #endif // APP_MENUS_ACCELERATOR_H_
88 74
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698