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

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

Issue 11413217: Instant API: tell page whether the browser is capturing key strokes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@focus
Patch Set: Fixed comments, mouse handling logic. Created 8 years 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
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 // ========================================================================= 10 // =========================================================================
(...skipping 15 matching lines...) Expand all
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 GetAutocompleteResults(); 31 native function GetAutocompleteResults();
32 native function GetContext(); 32 native function GetContext();
33 native function GetDisplayInstantResults(); 33 native function GetDisplayInstantResults();
34 native function GetThemeBackgroundInfo(); 34 native function GetThemeBackgroundInfo();
35 native function GetThemeAreaHeight(); 35 native function GetThemeAreaHeight();
36 native function IsKeyCaptureEnabled();
36 native function NavigateContentWindow(); 37 native function NavigateContentWindow();
37 native function SetSuggestions(); 38 native function SetSuggestions();
38 native function SetQuerySuggestion(); 39 native function SetQuerySuggestion();
39 native function SetQuerySuggestionFromAutocompleteResult(); 40 native function SetQuerySuggestionFromAutocompleteResult();
40 native function SetQuery(); 41 native function SetQuery();
41 native function SetQueryFromAutocompleteResult(); 42 native function SetQueryFromAutocompleteResult();
42 native function Show(); 43 native function Show();
43 native function StartCapturingKeyStrokes(); 44 native function StartCapturingKeyStrokes();
44 native function StopCapturingKeyStrokes(); 45 native function StopCapturingKeyStrokes();
45 46
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // ========================================================================= 181 // =========================================================================
181 this.__defineGetter__('value', GetQuery); 182 this.__defineGetter__('value', GetQuery);
182 this.__defineGetter__('verbatim', GetVerbatim); 183 this.__defineGetter__('verbatim', GetVerbatim);
183 this.__defineGetter__('selectionStart', GetSelectionStart); 184 this.__defineGetter__('selectionStart', GetSelectionStart);
184 this.__defineGetter__('selectionEnd', GetSelectionEnd); 185 this.__defineGetter__('selectionEnd', GetSelectionEnd);
185 this.__defineGetter__('x', GetX); 186 this.__defineGetter__('x', GetX);
186 this.__defineGetter__('y', GetY); 187 this.__defineGetter__('y', GetY);
187 this.__defineGetter__('width', GetWidth); 188 this.__defineGetter__('width', GetWidth);
188 this.__defineGetter__('height', GetHeight); 189 this.__defineGetter__('height', GetHeight);
189 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); 190 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper);
191 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled);
190 this.__defineGetter__('context', GetContext); 192 this.__defineGetter__('context', GetContext);
191 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); 193 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults);
192 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); 194 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo);
193 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight); 195 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight);
194 this.setSuggestions = function(text) { 196 this.setSuggestions = function(text) {
195 SetSuggestions(text); 197 SetSuggestions(text);
196 }; 198 };
197 this.setAutocompleteText = function(text, behavior) { 199 this.setAutocompleteText = function(text, behavior) {
198 SetQuerySuggestion(text, behavior); 200 SetQuerySuggestion(text, behavior);
199 }; 201 };
(...skipping 20 matching lines...) Expand all
220 }; 222 };
221 this.stopCapturingKeyStrokes = function() { 223 this.stopCapturingKeyStrokes = function() {
222 StopCapturingKeyStrokes(); 224 StopCapturingKeyStrokes();
223 }; 225 };
224 this.onchange = null; 226 this.onchange = null;
225 this.onsubmit = null; 227 this.onsubmit = null;
226 this.oncancel = null; 228 this.oncancel = null;
227 this.onresize = null; 229 this.onresize = null;
228 this.onautocompleteresults = null; 230 this.onautocompleteresults = null;
229 this.onkeypress = null; 231 this.onkeypress = null;
232 this.onkeycapturechange = null;
230 this.oncontextchange = null; 233 this.oncontextchange = null;
231 }; 234 };
232 } 235 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698