summaryrefslogtreecommitdiffstats
path: root/app/menus/accelerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'app/menus/accelerator.h')
-rw-r--r--app/menus/accelerator.h14
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_