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

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: Fix tests. 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
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 24 matching lines...) Expand all
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 GetAutocompleteResults(); 40 native function GetAutocompleteResults();
41 native function GetContext(); 41 native function GetContext();
42 native function GetDisplayInstantResults(); 42 native function GetDisplayInstantResults();
43 native function GetThemeBackgroundInfo(); 43 native function GetThemeBackgroundInfo();
44 native function GetThemeAreaHeight(); 44 native function GetThemeAreaHeight();
45 native function IsKeyCaptureEnabled();
45 native function NavigateContentWindow(); 46 native function NavigateContentWindow();
46 native function SetSuggestions(); 47 native function SetSuggestions();
47 native function SetQuerySuggestion(); 48 native function SetQuerySuggestion();
48 native function SetQuerySuggestionFromAutocompleteResult(); 49 native function SetQuerySuggestionFromAutocompleteResult();
49 native function SetQuery(); 50 native function SetQuery();
50 native function SetQueryFromAutocompleteResult(); 51 native function SetQueryFromAutocompleteResult();
51 native function Show(); 52 native function Show();
52 native function StartCapturingKeyStrokes(); 53 native function StartCapturingKeyStrokes();
53 native function StopCapturingKeyStrokes(); 54 native function StopCapturingKeyStrokes();
54 55
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // ========================================================================= 191 // =========================================================================
191 this.__defineGetter__('value', GetQuery); 192 this.__defineGetter__('value', GetQuery);
192 this.__defineGetter__('verbatim', GetVerbatim); 193 this.__defineGetter__('verbatim', GetVerbatim);
193 this.__defineGetter__('selectionStart', GetSelectionStart); 194 this.__defineGetter__('selectionStart', GetSelectionStart);
194 this.__defineGetter__('selectionEnd', GetSelectionEnd); 195 this.__defineGetter__('selectionEnd', GetSelectionEnd);
195 this.__defineGetter__('x', GetX); 196 this.__defineGetter__('x', GetX);
196 this.__defineGetter__('y', GetY); 197 this.__defineGetter__('y', GetY);
197 this.__defineGetter__('width', GetWidth); 198 this.__defineGetter__('width', GetWidth);
198 this.__defineGetter__('height', GetHeight); 199 this.__defineGetter__('height', GetHeight);
199 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper); 200 this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper);
201 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled);
200 this.__defineGetter__('context', GetContext); 202 this.__defineGetter__('context', GetContext);
201 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); 203 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults);
202 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); 204 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo);
203 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight); 205 this.__defineGetter__('themeAreaHeight', GetThemeAreaHeight);
204 this.setSuggestions = function(text) { 206 this.setSuggestions = function(text) {
205 SetSuggestions(text); 207 SetSuggestions(text);
206 }; 208 };
207 this.setAutocompleteText = function(text, behavior) { 209 this.setAutocompleteText = function(text, behavior) {
208 SetQuerySuggestion(text, behavior); 210 SetQuerySuggestion(text, behavior);
209 }; 211 };
(...skipping 20 matching lines...) Expand all
230 }; 232 };
231 this.stopCapturingKeyStrokes = function() { 233 this.stopCapturingKeyStrokes = function() {
232 StopCapturingKeyStrokes(); 234 StopCapturingKeyStrokes();
233 }; 235 };
234 this.onchange = null; 236 this.onchange = null;
235 this.onsubmit = null; 237 this.onsubmit = null;
236 this.oncancel = null; 238 this.oncancel = null;
237 this.onresize = null; 239 this.onresize = null;
238 this.onautocompleteresults = null; 240 this.onautocompleteresults = null;
239 this.onkeypress = null; 241 this.onkeypress = null;
242 this.onkeycapturechange = null;
240 this.oncontextchange = null; 243 this.oncontextchange = null;
241 }; 244 };
242 } 245 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698