| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |