Index: chrome/browser/extensions/extension_keybinding_registry.h |
diff --git a/chrome/browser/extensions/extension_keybinding_registry.h b/chrome/browser/extensions/extension_keybinding_registry.h |
index 723a6bbbc712eaade3479a492d68cd6e37db006a..f60a7336f37f624bf86ed0bc436c5e77bef046a4 100644 |
--- a/chrome/browser/extensions/extension_keybinding_registry.h |
+++ b/chrome/browser/extensions/extension_keybinding_registry.h |
@@ -84,6 +84,10 @@ class ExtensionKeybindingRegistry : public content::NotificationObserver { |
// commands are currently ignored, since they are handled elsewhere. |
bool ShouldIgnoreCommand(const std::string& command) const; |
+ // Fire event targets which the specified accelerator is binding with. Returns |
+ // true if we can find the appropriate event targets. |
+ bool NotifyEventTargetsByAccelerator(const ui::Accelerator& accelerator); |
+ |
// Notifies appropriate parties that a command has been executed. |
void CommandExecuted(const std::string& extension_id, |
const std::string& command); |
@@ -97,6 +101,12 @@ class ExtensionKeybindingRegistry : public content::NotificationObserver { |
std::pair<std::string, std::string> > EventTargets; |
EventTargets event_targets_; |
+ // Maps an accelerator that are media keys to a list of string pair (extension |
+ // id, command name) for media keys commands that have been registered. |
+ typedef std::list<std::pair<std::string, std::string> > TargetList; |
+ typedef std::map<ui::Accelerator, TargetList> MediaKeysEventTargets; |
+ MediaKeysEventTargets media_keys_event_targets_; |
Finnur
2013/11/12 16:27:54
I think you should just use only the map you creat
zhchbin
2013/11/13 05:01:57
Yes. I have this idea before. My concern is that I
Finnur
2013/11/13 10:22:24
How about this...
You make the change for Windows
zhchbin
2013/11/13 16:05:10
Done.
|
+ |
private: |
// Returns true if the |extension| matches our extension filter. |
bool ExtensionMatchesFilter(const extensions::Extension* extension); |