OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 11 matching lines...) Expand all Loading... |
22 // Private functions | 22 // Private functions |
23 // ========================================================================= | 23 // ========================================================================= |
24 native function GetQuery(); | 24 native function GetQuery(); |
25 native function GetVerbatim(); | 25 native function GetVerbatim(); |
26 native function GetSelectionStart(); | 26 native function GetSelectionStart(); |
27 native function GetSelectionEnd(); | 27 native function GetSelectionEnd(); |
28 native function GetX(); | 28 native function GetX(); |
29 native function GetY(); | 29 native function GetY(); |
30 native function GetWidth(); | 30 native function GetWidth(); |
31 native function GetHeight(); | 31 native function GetHeight(); |
| 32 native function GetStartMargin(); |
| 33 native function GetEndMargin(); |
| 34 native function GetRightToLeft(); |
32 native function GetAutocompleteResults(); | 35 native function GetAutocompleteResults(); |
33 native function GetIsFocused(); | 36 native function GetIsFocused(); |
34 native function GetContext(); | 37 native function GetContext(); |
35 native function NavigateContentWindow(); | 38 native function NavigateContentWindow(); |
36 native function SetSuggestions(); | 39 native function SetSuggestions(); |
37 native function SetQuerySuggestion(); | 40 native function SetQuerySuggestion(); |
38 native function SetQuerySuggestionFromAutocompleteResult(); | 41 native function SetQuerySuggestionFromAutocompleteResult(); |
39 native function SetQuery(); | 42 native function SetQuery(); |
40 native function SetQueryFromAutocompleteResult(); | 43 native function SetQueryFromAutocompleteResult(); |
41 native function SetPreviewHeight(); | 44 native function SetPreviewHeight(); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // Exported functions | 172 // Exported functions |
170 // ========================================================================= | 173 // ========================================================================= |
171 this.__defineGetter__('value', GetQuery); | 174 this.__defineGetter__('value', GetQuery); |
172 this.__defineGetter__('verbatim', GetVerbatim); | 175 this.__defineGetter__('verbatim', GetVerbatim); |
173 this.__defineGetter__('selectionStart', GetSelectionStart); | 176 this.__defineGetter__('selectionStart', GetSelectionStart); |
174 this.__defineGetter__('selectionEnd', GetSelectionEnd); | 177 this.__defineGetter__('selectionEnd', GetSelectionEnd); |
175 this.__defineGetter__('x', GetX); | 178 this.__defineGetter__('x', GetX); |
176 this.__defineGetter__('y', GetY); | 179 this.__defineGetter__('y', GetY); |
177 this.__defineGetter__('width', GetWidth); | 180 this.__defineGetter__('width', GetWidth); |
178 this.__defineGetter__('height', GetHeight); | 181 this.__defineGetter__('height', GetHeight); |
| 182 this.__defineGetter__('startMargin', GetStartMargin); |
| 183 this.__defineGetter__('endMargin', GetEndMargin); |
| 184 this.__defineGetter__('rtl', GetRightToLeft); |
179 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); | 185 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); |
180 this.__defineGetter__('isFocused', GetIsFocused); | 186 this.__defineGetter__('isFocused', GetIsFocused); |
181 this.__defineGetter__('context', GetContext); | 187 this.__defineGetter__('context', GetContext); |
182 this.setSuggestions = function(text) { | 188 this.setSuggestions = function(text) { |
183 SetSuggestions(text); | 189 SetSuggestions(text); |
184 }; | 190 }; |
185 this.setAutocompleteText = function(text, behavior) { | 191 this.setAutocompleteText = function(text, behavior) { |
186 SetQuerySuggestion(text, behavior); | 192 SetQuerySuggestion(text, behavior); |
187 }; | 193 }; |
188 this.setRestrictedAutocompleteText = function(resultId, behavior) { | 194 this.setRestrictedAutocompleteText = function(resultId, behavior) { |
(...skipping 20 matching lines...) Expand all Loading... |
209 }; | 215 }; |
210 this.onchange = null; | 216 this.onchange = null; |
211 this.onsubmit = null; | 217 this.onsubmit = null; |
212 this.oncancel = null; | 218 this.oncancel = null; |
213 this.onresize = null; | 219 this.onresize = null; |
214 this.onautocompleteresults = null; | 220 this.onautocompleteresults = null; |
215 this.onkeypress = null; | 221 this.onkeypress = null; |
216 this.onfocus = null; | 222 this.onfocus = null; |
217 this.onblur = null; | 223 this.onblur = null; |
218 this.oncontextchange = null; | 224 this.oncontextchange = null; |
| 225 this.onmarginchange = null; |
219 }; | 226 }; |
220 } | 227 } |
OLD | NEW |