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

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

Issue 12663022: . (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/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 fa0ced3aa34515132f9f4c72a0a07b71fe0ea065..e41d11447afd312cca60a9712941511db85ecf88 100644
--- a/chrome/renderer/resources/extensions/omnibox_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/omnibox_custom_bindings.js
@@ -84,6 +84,16 @@ function parseOmniboxDescription(input) {
binding.registerCustomHook(function(bindingsAPI) {
var apiFunctions = bindingsAPI.apiFunctions;
+ apiFunctions.setUpdateArgumentsPreValidate('setDefaultSuggestions',
+ function(suggestResult) {
+ if (suggestResult.content != undefined) { // null, etc.
+ throw new Error(
+ 'setDefaultSuggestions cannot contain the "content" field');
+ }
+ suggestResult.content = '';
+ return [suggestResult];
+ });
+
apiFunctions.setHandleRequest('setDefaultSuggestion', function(details) {
var parseResult = parseOmniboxDescription(details.description);
sendRequest(this.name, [parseResult], this.definition.parameters);
« 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