Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5075)

Unified Diff: chrome/browser/extensions/extension_keybinding_registry.cc

Issue 547783002: Fixes HasEventListener check in ExtensionKeybindingRegistry::ExecuteCommands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromevox_commands
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 deeb0a4ed6886fa26127a7ec70e3489051db5d9d..40c7712147e0c331ee932d59a311277932eff1a9 100644
--- a/chrome/browser/extensions/extension_keybinding_registry.cc
+++ b/chrome/browser/extensions/extension_keybinding_registry.cc
@@ -238,14 +238,13 @@ bool ExtensionKeybindingRegistry::ExecuteCommands(
if (targets == event_targets_.end() || targets->second.empty())
return false;
- if (!extension_id.empty() &&
- !extensions::EventRouter::Get(browser_context_)
- ->ExtensionHasEventListener(extension_id, kOnCommandEventName))
- return false;
-
bool executed = false;
for (TargetList::const_iterator it = targets->second.begin();
it != targets->second.end(); it++) {
+ if (!extensions::EventRouter::Get(browser_context_)
+ ->ExtensionHasEventListener(it->first, kOnCommandEventName))
+ continue;
+
if (extension_id.empty() || it->first == extension_id) {
CommandExecuted(it->first, it->second);
executed = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698