diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 23:18:50 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 23:18:50 +0000 |
commit | 4232100ca0d42e558e75a728b69abca4b28499bf (patch) | |
tree | e736db46d06de1f65d6aa92ccc119ab067927770 /app/menus | |
parent | 7303999ef7654bbb633e901717fedcc31afca4fe (diff) | |
download | chromium_src-4232100ca0d42e558e75a728b69abca4b28499bf.zip chromium_src-4232100ca0d42e558e75a728b69abca4b28499bf.tar.gz chromium_src-4232100ca0d42e558e75a728b69abca4b28499bf.tar.bz2 |
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
Diffstat (limited to 'app/menus')
-rw-r--r-- | app/menus/accelerator.h | 14 |
1 files changed, 14 insertions, 0 deletions
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_ |