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

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

Issue 504183004: Continue key propagation for extensions without any listeners to chrome.commands.onCommand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years, 4 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 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++) {
« 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