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

Unified Diff: chrome/renderer/resources/extensions/omnibox_custom_bindings.js

Issue 10704073: Plumb listenerIDs correctly for events that clobber chrome.Event.prototype.dispatch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 6 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
Index: chrome/renderer/resources/extensions/omnibox_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/omnibox_custom_bindings.js b/chrome/renderer/resources/extensions/omnibox_custom_bindings.js
index de68a764d2f0700bb7056e42b8a600906e534cb7..745010ada856efa39821127fd28476064819ab24 100644
--- a/chrome/renderer/resources/extensions/omnibox_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/omnibox_custom_bindings.js
@@ -97,12 +97,14 @@ chromeHidden.registerCustomHook('omnibox', function(bindingsAPI) {
}
return [requestId, suggestions];
});
+});
- chrome.omnibox.onInputChanged.dispatch =
- function(text, requestId) {
- var suggestCallback = function(suggestions) {
- chrome.omnibox.sendSuggestions(requestId, suggestions);
- };
- chrome.Event.prototype.dispatch.apply(this, [text, suggestCallback]);
+chromeHidden.Event.registerArgumentMassager('omnibox.onInputChanged',
+ function(args, dispatch) {
+ var text = args[0];
+ var requestId = args[1];
+ var suggestCallback = function(suggestions) {
+ chrome.omnibox.sendSuggestions(requestId, suggestions);
};
+ dispatch([text, suggestCallback]);
});

Powered by Google App Engine
This is Rietveld 408576698