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.searchBox) { | 8 if (!chrome.searchBox) { |
9 chrome.searchBox = new function() { | 9 chrome.searchBox = new function() { |
10 // ========================================================================= | 10 // ========================================================================= |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Private functions | 21 // Private functions |
22 // ========================================================================= | 22 // ========================================================================= |
23 native function GetQuery(); | 23 native function GetQuery(); |
24 native function GetVerbatim(); | 24 native function GetVerbatim(); |
25 native function GetSelectionStart(); | 25 native function GetSelectionStart(); |
26 native function GetSelectionEnd(); | 26 native function GetSelectionEnd(); |
27 native function GetX(); | 27 native function GetX(); |
28 native function GetY(); | 28 native function GetY(); |
29 native function GetWidth(); | 29 native function GetWidth(); |
30 native function GetHeight(); | 30 native function GetHeight(); |
| 31 native function GetStartMargin(); |
| 32 native function GetEndMargin(); |
| 33 native function GetRightToLeft(); |
31 native function GetAutocompleteResults(); | 34 native function GetAutocompleteResults(); |
32 native function GetContext(); | 35 native function GetContext(); |
33 native function GetDisplayInstantResults(); | 36 native function GetDisplayInstantResults(); |
34 native function GetThemeBackgroundInfo(); | 37 native function GetThemeBackgroundInfo(); |
35 native function GetThemeAreaHeight(); | 38 native function GetThemeAreaHeight(); |
36 native function NavigateContentWindow(); | 39 native function NavigateContentWindow(); |
37 native function SetSuggestions(); | 40 native function SetSuggestions(); |
38 native function SetQuerySuggestion(); | 41 native function SetQuerySuggestion(); |
39 native function SetQuerySuggestionFromAutocompleteResult(); | 42 native function SetQuerySuggestionFromAutocompleteResult(); |
40 native function SetQuery(); | 43 native function SetQuery(); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // Exported functions | 182 // Exported functions |
180 // ========================================================================= | 183 // ========================================================================= |
181 this.__defineGetter__('value', GetQuery); | 184 this.__defineGetter__('value', GetQuery); |
182 this.__defineGetter__('verbatim', GetVerbatim); | 185 this.__defineGetter__('verbatim', GetVerbatim); |
183 this.__defineGetter__('selectionStart', GetSelectionStart); | 186 this.__defineGetter__('selectionStart', GetSelectionStart); |
184 this.__defineGetter__('selectionEnd', GetSelectionEnd); | 187 this.__defineGetter__('selectionEnd', GetSelectionEnd); |
185 this.__defineGetter__('x', GetX); | 188 this.__defineGetter__('x', GetX); |
186 this.__defineGetter__('y', GetY); | 189 this.__defineGetter__('y', GetY); |
187 this.__defineGetter__('width', GetWidth); | 190 this.__defineGetter__('width', GetWidth); |
188 this.__defineGetter__('height', GetHeight); | 191 this.__defineGetter__('height', GetHeight); |
| 192 this.__defineGetter__('startMargin', GetStartMargin); |
| 193 this.__defineGetter__('endMargin', GetEndMargin); |
| 194 this.__defineGetter__('rtl', GetRightToLeft); |
189 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); | 195 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); |
190 this.__defineGetter__('context', GetContext); | 196 this.__defineGetter__('context', GetContext); |
191 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); | 197 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); |
192 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); | 198 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); |
193 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight); | 199 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight); |
194 this.setSuggestions = function(text) { | 200 this.setSuggestions = function(text) { |
195 SetSuggestions(text); | 201 SetSuggestions(text); |
196 }; | 202 }; |
197 this.setAutocompleteText = function(text, behavior) { | 203 this.setAutocompleteText = function(text, behavior) { |
198 SetQuerySuggestion(text, behavior); | 204 SetQuerySuggestion(text, behavior); |
(...skipping 22 matching lines...) Expand all Loading... |
221 this.stopCapturingKeyStrokes = function() { | 227 this.stopCapturingKeyStrokes = function() { |
222 StopCapturingKeyStrokes(); | 228 StopCapturingKeyStrokes(); |
223 }; | 229 }; |
224 this.onchange = null; | 230 this.onchange = null; |
225 this.onsubmit = null; | 231 this.onsubmit = null; |
226 this.oncancel = null; | 232 this.oncancel = null; |
227 this.onresize = null; | 233 this.onresize = null; |
228 this.onautocompleteresults = null; | 234 this.onautocompleteresults = null; |
229 this.onkeypress = null; | 235 this.onkeypress = null; |
230 this.oncontextchange = null; | 236 this.oncontextchange = null; |
| 237 this.onmarginchange = null; |
231 }; | 238 }; |
232 } | 239 } |
OLD | NEW |