Chromium Code Reviews| Index: chrome/browser/extensions/extension_keybinding_registry.cc |
| diff --git a/chrome/browser/extensions/extension_keybinding_registry.cc b/chrome/browser/extensions/extension_keybinding_registry.cc |
| index 86b9116d0b1fb951c3886dc36f0df7c98b74269f..c1e6a7ee204a35fb7b0f55ae0a999094d223e154 100644 |
| --- a/chrome/browser/extensions/extension_keybinding_registry.cc |
| +++ b/chrome/browser/extensions/extension_keybinding_registry.cc |
| @@ -234,6 +234,12 @@ bool ExtensionKeybindingRegistry::ExecuteCommands( |
| if (targets == event_targets_.end() || targets->second.empty()) |
| return false; |
| + if (!extensions::EventRouter::Get(browser_context_) |
|
Finnur
2014/08/27 11:28:31
Be careful here: extension_id can be empty (see No
David Tseng
2014/08/27 16:34:22
You're totally right; this broke the majority of t
|
| + ->ExtensionHasEventListener( |
| + extension_id, |
| + "commands.onCommand")) |
|
Finnur
2014/08/27 11:28:31
This string literal also appears on line 118, so a
David Tseng
2014/08/27 16:34:22
Done.
|
| + return false; |
| + |
|
Finnur
2014/08/27 11:28:31
I'd like to see tests added for this functionality
David Tseng
2014/08/27 16:34:22
Working on some tests now; the existing tests appe
|
| bool executed = false; |
| for (TargetList::const_iterator it = targets->second.begin(); |
| it != targets->second.end(); it++) { |