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 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 GetThemeBackgroundInfo(); | 36 native function GetThemeBackgroundInfo(); |
34 native function GetThemeAreaHeight(); | 37 native function GetThemeAreaHeight(); |
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(); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Exported functions | 171 // Exported functions |
169 // ========================================================================= | 172 // ========================================================================= |
170 this.__defineGetter__('value', GetQuery); | 173 this.__defineGetter__('value', GetQuery); |
171 this.__defineGetter__('verbatim', GetVerbatim); | 174 this.__defineGetter__('verbatim', GetVerbatim); |
172 this.__defineGetter__('selectionStart', GetSelectionStart); | 175 this.__defineGetter__('selectionStart', GetSelectionStart); |
173 this.__defineGetter__('selectionEnd', GetSelectionEnd); | 176 this.__defineGetter__('selectionEnd', GetSelectionEnd); |
174 this.__defineGetter__('x', GetX); | 177 this.__defineGetter__('x', GetX); |
175 this.__defineGetter__('y', GetY); | 178 this.__defineGetter__('y', GetY); |
176 this.__defineGetter__('width', GetWidth); | 179 this.__defineGetter__('width', GetWidth); |
177 this.__defineGetter__('height', GetHeight); | 180 this.__defineGetter__('height', GetHeight); |
| 181 this.__defineGetter__('startMargin', GetStartMargin); |
| 182 this.__defineGetter__('endMargin', GetEndMargin); |
| 183 this.__defineGetter__('rtl', GetRightToLeft); |
178 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); | 184 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); |
179 this.__defineGetter__('context', GetContext); | 185 this.__defineGetter__('context', GetContext); |
180 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); | 186 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); |
181 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight); | 187 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight); |
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 }; |
(...skipping 15 matching lines...) Expand all Loading... |
203 this.navigateContentWindow = function(destination) { | 209 this.navigateContentWindow = function(destination) { |
204 return NavigateContentWindow(destination); | 210 return NavigateContentWindow(destination); |
205 }; | 211 }; |
206 this.onchange = null; | 212 this.onchange = null; |
207 this.onsubmit = null; | 213 this.onsubmit = null; |
208 this.oncancel = null; | 214 this.oncancel = null; |
209 this.onresize = null; | 215 this.onresize = null; |
210 this.onautocompleteresults = null; | 216 this.onautocompleteresults = null; |
211 this.onkeypress = null; | 217 this.onkeypress = null; |
212 this.oncontextchange = null; | 218 this.oncontextchange = null; |
| 219 this.onmarginchange = null; |
213 }; | 220 }; |
214 } | 221 } |
OLD | NEW |