| 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 if (!chrome.embeddedSearch) { | 8 if (!chrome.embeddedSearch) { |
| 9 chrome.embeddedSearch = new function() { | 9 chrome.embeddedSearch = new function() { |
| 10 native function NavigateContentWindow(); | 10 native function NavigateContentWindow(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 var WWW_REGEX = /^www\./; | 35 var WWW_REGEX = /^www\./; |
| 36 | 36 |
| 37 // ========================================================================= | 37 // ========================================================================= |
| 38 // Private functions | 38 // Private functions |
| 39 // ========================================================================= | 39 // ========================================================================= |
| 40 native function GetQuery(); | 40 native function GetQuery(); |
| 41 native function GetVerbatim(); | 41 native function GetVerbatim(); |
| 42 native function GetSelectionStart(); | 42 native function GetSelectionStart(); |
| 43 native function GetSelectionEnd(); | 43 native function GetSelectionEnd(); |
| 44 native function GetStartMargin(); | 44 native function GetStartMargin(); |
| 45 native function GetEndMargin(); | |
| 46 native function GetRightToLeft(); | 45 native function GetRightToLeft(); |
| 47 native function GetAutocompleteResults(); | 46 native function GetAutocompleteResults(); |
| 48 native function GetDisplayInstantResults(); | 47 native function GetDisplayInstantResults(); |
| 49 native function GetFont(); | 48 native function GetFont(); |
| 50 native function GetFontSize(); | 49 native function GetFontSize(); |
| 51 native function IsKeyCaptureEnabled(); | 50 native function IsKeyCaptureEnabled(); |
| 52 native function SetSuggestions(); | 51 native function SetSuggestions(); |
| 53 native function SetQuerySuggestion(); | 52 native function SetQuerySuggestion(); |
| 54 native function SetQuerySuggestionFromAutocompleteResult(); | 53 native function SetQuerySuggestionFromAutocompleteResult(); |
| 55 native function SetQuery(); | 54 native function SetQuery(); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 198 } |
| 200 | 199 |
| 201 // ========================================================================= | 200 // ========================================================================= |
| 202 // Exported functions | 201 // Exported functions |
| 203 // ========================================================================= | 202 // ========================================================================= |
| 204 this.__defineGetter__('value', GetQuery); | 203 this.__defineGetter__('value', GetQuery); |
| 205 this.__defineGetter__('verbatim', GetVerbatim); | 204 this.__defineGetter__('verbatim', GetVerbatim); |
| 206 this.__defineGetter__('selectionStart', GetSelectionStart); | 205 this.__defineGetter__('selectionStart', GetSelectionStart); |
| 207 this.__defineGetter__('selectionEnd', GetSelectionEnd); | 206 this.__defineGetter__('selectionEnd', GetSelectionEnd); |
| 208 this.__defineGetter__('startMargin', GetStartMargin); | 207 this.__defineGetter__('startMargin', GetStartMargin); |
| 209 this.__defineGetter__('endMargin', GetEndMargin); | |
| 210 this.__defineGetter__('rtl', GetRightToLeft); | 208 this.__defineGetter__('rtl', GetRightToLeft); |
| 211 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); | 209 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); |
| 212 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled); | 210 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled); |
| 213 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); | 211 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); |
| 214 this.__defineGetter__('font', GetFont); | 212 this.__defineGetter__('font', GetFont); |
| 215 this.__defineGetter__('fontSize', GetFontSize); | 213 this.__defineGetter__('fontSize', GetFontSize); |
| 216 | 214 |
| 217 this.setSuggestions = function(text) { | 215 this.setSuggestions = function(text) { |
| 218 SetSuggestions(text); | 216 SetSuggestions(text); |
| 219 }; | 217 }; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 269 |
| 272 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); | 270 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); |
| 273 | 271 |
| 274 this.onthemechange = null; | 272 this.onthemechange = null; |
| 275 }; | 273 }; |
| 276 | 274 |
| 277 // Export legacy searchbox API. | 275 // Export legacy searchbox API. |
| 278 // TODO: Remove this when Instant Extended is fully launched. | 276 // TODO: Remove this when Instant Extended is fully launched. |
| 279 chrome.searchBox = chrome.embeddedSearch.searchBox; | 277 chrome.searchBox = chrome.embeddedSearch.searchBox; |
| 280 } | 278 } |
| OLD | NEW |