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

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: Simplified LocationBarView::OnBoundsChanged Created 7 years, 9 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.embeddedSearch) { 8 if (!chrome.embeddedSearch) {
9 chrome.embeddedSearch = new function() { 9 chrome.embeddedSearch = new function() {
10 native function NavigateContentWindow(); 10 native function NavigateContentWindow();
(...skipping 25 matching lines...) Expand all
36 36
37 // ========================================================================= 37 // =========================================================================
38 // Private functions 38 // Private functions
39 // ========================================================================= 39 // =========================================================================
40 native function DeleteMostVisitedItem(); 40 native function DeleteMostVisitedItem();
41 native function GetQuery(); 41 native function GetQuery();
42 native function GetVerbatim(); 42 native function GetVerbatim();
43 native function GetSelectionStart(); 43 native function GetSelectionStart();
44 native function GetSelectionEnd(); 44 native function GetSelectionEnd();
45 native function GetStartMargin(); 45 native function GetStartMargin();
46 native function GetEndMargin();
47 native function GetRightToLeft(); 46 native function GetRightToLeft();
48 native function GetAutocompleteResults(); 47 native function GetAutocompleteResults();
49 native function GetDisplayInstantResults(); 48 native function GetDisplayInstantResults();
50 native function GetFont(); 49 native function GetFont();
51 native function GetFontSize(); 50 native function GetFontSize();
52 native function GetMostVisitedItems(); 51 native function GetMostVisitedItems();
53 native function IsKeyCaptureEnabled(); 52 native function IsKeyCaptureEnabled();
54 native function SetSuggestions(); 53 native function SetSuggestions();
55 native function SetQuerySuggestion(); 54 native function SetQuerySuggestion();
56 native function SetQuerySuggestionFromAutocompleteResult(); 55 native function SetQuerySuggestionFromAutocompleteResult();
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 227 }
229 228
230 // ========================================================================= 229 // =========================================================================
231 // Exported functions 230 // Exported functions
232 // ========================================================================= 231 // =========================================================================
233 this.__defineGetter__('value', GetQuery); 232 this.__defineGetter__('value', GetQuery);
234 this.__defineGetter__('verbatim', GetVerbatim); 233 this.__defineGetter__('verbatim', GetVerbatim);
235 this.__defineGetter__('selectionStart', GetSelectionStart); 234 this.__defineGetter__('selectionStart', GetSelectionStart);
236 this.__defineGetter__('selectionEnd', GetSelectionEnd); 235 this.__defineGetter__('selectionEnd', GetSelectionEnd);
237 this.__defineGetter__('startMargin', GetStartMargin); 236 this.__defineGetter__('startMargin', GetStartMargin);
238 this.__defineGetter__('endMargin', GetEndMargin);
239 this.__defineGetter__('rtl', GetRightToLeft); 237 this.__defineGetter__('rtl', GetRightToLeft);
240 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); 238 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper);
241 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled); 239 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled);
242 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); 240 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults);
243 this.__defineGetter__('font', GetFont); 241 this.__defineGetter__('font', GetFont);
244 this.__defineGetter__('fontSize', GetFontSize); 242 this.__defineGetter__('fontSize', GetFontSize);
245 this.__defineGetter__('mostVisited', GetMostVisitedItemsWrapper); 243 this.__defineGetter__('mostVisited', GetMostVisitedItemsWrapper);
246 244
247 this.setSuggestions = function(text) { 245 this.setSuggestions = function(text) {
248 SetSuggestions(text); 246 SetSuggestions(text);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 309
312 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); 310 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo);
313 311
314 this.onthemechange = null; 312 this.onthemechange = null;
315 }; 313 };
316 314
317 // Export legacy searchbox API. 315 // Export legacy searchbox API.
318 // TODO: Remove this when Instant Extended is fully launched. 316 // TODO: Remove this when Instant Extended is fully launched.
319 chrome.searchBox = chrome.embeddedSearch.searchBox; 317 chrome.searchBox = chrome.embeddedSearch.searchBox;
320 } 318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698