Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Side by Side Diff: chrome/renderer/resources/extensions/searchbox_api.js

Issue 12047107: Change the SearchBox API from using the start/end margins of the location bar to using the start ma… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to r180728 Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 var safeObjects = {}; 10 var safeObjects = {};
(...skipping 19 matching lines...) Expand all
30 // Private functions 30 // Private functions
31 // ========================================================================= 31 // =========================================================================
32 native function GetQuery(); 32 native function GetQuery();
33 native function GetVerbatim(); 33 native function GetVerbatim();
34 native function GetSelectionStart(); 34 native function GetSelectionStart();
35 native function GetSelectionEnd(); 35 native function GetSelectionEnd();
36 native function GetX(); 36 native function GetX();
37 native function GetY(); 37 native function GetY();
38 native function GetWidth(); 38 native function GetWidth();
39 native function GetHeight(); 39 native function GetHeight();
40 native function GetStartMargin(); 40 native function GetLocationBarMargin();
41 native function GetEndMargin(); 41 native function GetLocationBarWidth();
42 native function GetRightToLeft(); 42 native function GetRightToLeft();
43 native function GetAutocompleteResults(); 43 native function GetAutocompleteResults();
44 native function GetContext(); 44 native function GetContext();
45 native function GetDisplayInstantResults(); 45 native function GetDisplayInstantResults();
46 native function GetFont(); 46 native function GetFont();
47 native function GetFontSize(); 47 native function GetFontSize();
48 native function GetThemeBackgroundInfo(); 48 native function GetThemeBackgroundInfo();
49 native function GetThemeAreaHeight(); 49 native function GetThemeAreaHeight();
50 native function IsKeyCaptureEnabled(); 50 native function IsKeyCaptureEnabled();
51 native function NavigateContentWindow(); 51 native function NavigateContentWindow();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Exported functions 201 // Exported functions
202 // ========================================================================= 202 // =========================================================================
203 this.__defineGetter__('value', GetQuery); 203 this.__defineGetter__('value', GetQuery);
204 this.__defineGetter__('verbatim', GetVerbatim); 204 this.__defineGetter__('verbatim', GetVerbatim);
205 this.__defineGetter__('selectionStart', GetSelectionStart); 205 this.__defineGetter__('selectionStart', GetSelectionStart);
206 this.__defineGetter__('selectionEnd', GetSelectionEnd); 206 this.__defineGetter__('selectionEnd', GetSelectionEnd);
207 this.__defineGetter__('x', GetX); 207 this.__defineGetter__('x', GetX);
208 this.__defineGetter__('y', GetY); 208 this.__defineGetter__('y', GetY);
209 this.__defineGetter__('width', GetWidth); 209 this.__defineGetter__('width', GetWidth);
210 this.__defineGetter__('height', GetHeight); 210 this.__defineGetter__('height', GetHeight);
211 this.__defineGetter__('startMargin', GetStartMargin); 211 this.__defineGetter__('locationBarMargin', GetLocationBarMargin);
samarth 2013/02/05 23:39:33 I like that the names are more explicit throughout
melevin 2013/02/06 23:44:05 Done.
212 this.__defineGetter__('endMargin', GetEndMargin); 212 this.__defineGetter__('locationBarWidth', GetLocationBarWidth);
213 this.__defineGetter__('rtl', GetRightToLeft); 213 this.__defineGetter__('rtl', GetRightToLeft);
214 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); 214 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper);
215 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled); 215 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled);
216 this.__defineGetter__('context', GetContext); 216 this.__defineGetter__('context', GetContext);
217 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); 217 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults);
218 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); 218 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo);
219 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight); 219 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight);
220 this.__defineGetter__('font', GetFont); 220 this.__defineGetter__('font', GetFont);
221 this.__defineGetter__('fontSize', GetFontSize); 221 this.__defineGetter__('fontSize', GetFontSize);
222 this.setSuggestions = function(text) { 222 this.setSuggestions = function(text) {
(...skipping 30 matching lines...) Expand all
253 this.onsubmit = null; 253 this.onsubmit = null;
254 this.oncancel = null; 254 this.oncancel = null;
255 this.onresize = null; 255 this.onresize = null;
256 this.onautocompleteresults = null; 256 this.onautocompleteresults = null;
257 this.onkeypress = null; 257 this.onkeypress = null;
258 this.onkeycapturechange = null; 258 this.onkeycapturechange = null;
259 this.oncontextchange = null; 259 this.oncontextchange = null;
260 this.onmarginchange = null; 260 this.onmarginchange = null;
261 }; 261 };
262 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698