From 4232100ca0d42e558e75a728b69abca4b28499bf Mon Sep 17 00:00:00 2001 From: "erg@google.com" Date: Mon, 23 Aug 2010 23:18:50 +0000 Subject: Clean up the WrenchMenuModel so that it uses SimpleMenu::Delegate. This removes copy-pasted code in each platform implementation. BUG=47320 TEST=compiles Review URL: http://codereview.chromium.org/3163023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57119 0039d316-1c4b-4281-b951-d872f2087c98 --- app/menus/accelerator.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/menus') diff --git a/app/menus/accelerator.h b/app/menus/accelerator.h index def6cf2..0509c14 100644 --- a/app/menus/accelerator.h +++ b/app/menus/accelerator.h @@ -68,6 +68,20 @@ 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: + virtual ~AcceleratorProvider() {} + + // 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; +}; + } #endif // APP_MENUS_ACCELERATOR_H_ -- cgit v1.1