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

Side by Side Diff: chrome/renderer/resources/extensions/searchbox_api.js

Issue 12319108: Prevent querying of restricted query values. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var chrome; 5 var chrome;
6 if (!chrome) 6 if (!chrome)
7 chrome = {}; 7 chrome = {};
8 8
9 if (!chrome.embeddedSearch) { 9 if (!chrome.embeddedSearch) {
10 chrome.embeddedSearch = new function() { 10 chrome.embeddedSearch = new function() {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 }; 241 };
242 this.setAutocompleteText = function(text, behavior) { 242 this.setAutocompleteText = function(text, behavior) {
243 SetQuerySuggestion(text, behavior); 243 SetQuerySuggestion(text, behavior);
244 }; 244 };
245 this.setRestrictedAutocompleteText = function(autocompleteResultId) { 245 this.setRestrictedAutocompleteText = function(autocompleteResultId) {
246 SetQuerySuggestionFromAutocompleteResult(autocompleteResultId); 246 SetQuerySuggestionFromAutocompleteResult(autocompleteResultId);
247 }; 247 };
248 this.setValue = function(text, type) { 248 this.setValue = function(text, type) {
249 SetQuery(text, type); 249 SetQuery(text, type);
250 }; 250 };
251 // Must access nativeSuggestions before calling setRestrictedValue.
251 this.setRestrictedValue = function(autocompleteResultId) { 252 this.setRestrictedValue = function(autocompleteResultId) {
252 SetQueryFromAutocompleteResult(autocompleteResultId); 253 SetQueryFromAutocompleteResult(autocompleteResultId);
253 }; 254 };
254 // TODO(jered): Remove the deprecated "reason" argument. 255 // TODO(jered): Remove the deprecated "reason" argument.
255 this.showOverlay = function(reason, height) { 256 this.showOverlay = function(reason, height) {
256 ShowOverlay(reason, height); 257 ShowOverlay(reason, height);
257 }; 258 };
258 // TODO(jered): Remove this when GWS knows about showOverlay(). 259 // TODO(jered): Remove this when GWS knows about showOverlay().
259 this.show = this.showOverlay; 260 this.show = this.showOverlay;
260 this.markDuplicateSuggestions = function(clientSuggestions) { 261 this.markDuplicateSuggestions = function(clientSuggestions) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 346
346 this.onmostvisitedchange = null; 347 this.onmostvisitedchange = null;
347 this.onthemechange = null; 348 this.onthemechange = null;
348 }; 349 };
349 350
350 // Export legacy searchbox API. 351 // Export legacy searchbox API.
351 // TODO: Remove this when Instant Extended is fully launched. 352 // TODO: Remove this when Instant Extended is fully launched.
352 chrome.searchBox = this.searchBox; 353 chrome.searchBox = this.searchBox;
353 }; 354 };
354 } 355 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_extended_browsertest.cc ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698