Index: chrome/renderer/resources/extension_process_bindings.js |
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js |
index c3d6a33a27acc9bb3aa6c585ae5d18414b4613a5..fe393baa98b752ff455c88598948728ecce0546f 100644 |
--- a/chrome/renderer/resources/extension_process_bindings.js |
+++ b/chrome/renderer/resources/extension_process_bindings.js |
@@ -305,6 +305,21 @@ var chrome = chrome || {}; |
}); |
} |
+ function setupOmniboxEvents(extensionId) { |
+ chrome.experimental.omnibox.onInputEntered = |
+ new chrome.Event("experimental.omnibox.onInputEntered/" + extensionId); |
+ |
+ chrome.experimental.omnibox.onInputChanged = |
+ new chrome.Event("experimental.omnibox.onInputChanged/" + extensionId); |
+ chrome.experimental.omnibox.onInputChanged.dispatch = |
+ function(text, requestId) { |
+ var suggestCallback = function(suggestions) { |
+ chrome.experimental.omnibox.sendSuggestions(requestId, suggestions); |
+ } |
+ chrome.Event.prototype.dispatch.apply(this, [text, suggestCallback]); |
+ }; |
+ } |
+ |
chromeHidden.onLoad.addListener(function (extensionId) { |
chrome.initExtension(extensionId, false); |
@@ -636,6 +651,7 @@ var chrome = chrome || {}; |
setupToolstripEvents(GetRenderViewId()); |
setupPopupEvents(GetRenderViewId()); |
setupHiddenContextMenuEvent(extensionId); |
+ setupOmniboxEvents(extensionId); |
}); |
if (!chrome.experimental) |