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

Unified Diff: app/menus/accelerator.h

Issue 3163023: Clean up the WrenchMenuModel so that it uses SimpleMenu::Delegate. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix stray rb 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 side-by-side diff with in-line comments
Download patch
Index: app/menus/accelerator.h
diff --git a/app/menus/accelerator.h b/app/menus/accelerator.h
index def6cf2f2a30926ba3eed0d7309b87b079f77d75..77f7a35f9bf82c05fe53ae98ef8cfd5a87614590 100644
--- a/app/menus/accelerator.h
+++ b/app/menus/accelerator.h
@@ -68,6 +68,18 @@ class Accelerator {
int modifiers_;
};
+// Since acclerator code is one of the few things that can't be cross platform
+// in the chrome UI, separate out just the GetAcceleratorForCommandId() from
+// the menu delegates.
+class AcceleratorProvider {
+ public:
+ // Gets the accelerator for the specified command id. Returns true if the
+ // command id has a valid accelerator, false otherwise.
+ virtual bool GetAcceleratorForCommandId(
+ int command_id,
+ menus::Accelerator* accelerator) = 0;
+};
sky 2010/08/23 21:55:59 virtual protected destructor?
+
}
#endif // APP_MENUS_ACCELERATOR_H_
« no previous file with comments | « no previous file | chrome/browser/cocoa/toolbar_controller.h » ('j') | chrome/browser/cocoa/toolbar_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698