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

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

Issue 1428423002: Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac fix Created 5 years, 1 month 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 8
9 if (!chrome.embeddedSearch) { 9 if (!chrome.embeddedSearch) {
10 chrome.embeddedSearch = new function() { 10 chrome.embeddedSearch = new function() {
11 this.searchBox = new function() { 11 this.searchBox = new function() {
12 12
13 // ======================================================================= 13 // =======================================================================
14 // Private functions 14 // Private functions
15 // ======================================================================= 15 // =======================================================================
16 native function Focus(); 16 native function Focus();
17 native function GetDisplayInstantResults(); 17 native function GetDisplayInstantResults();
18 native function GetMostVisitedItemData(); 18 native function GetMostVisitedItemData();
19 native function GetQuery(); 19 native function GetQuery();
20 native function GetSearchRequestParams(); 20 native function GetSearchRequestParams();
21 native function GetRightToLeft(); 21 native function GetRightToLeft();
22 native function GetStartMargin(); 22 native function GetStartMargin();
23 native function GetSuggestionToPrefetch(); 23 native function GetSuggestionToPrefetch();
24 native function IsFocused(); 24 native function IsFocused();
25 native function IsKeyCaptureEnabled(); 25 native function IsKeyCaptureEnabled();
26 native function Paste(); 26 native function Paste();
27 native function SetVoiceSearchSupported();
28 native function StartCapturingKeyStrokes(); 27 native function StartCapturingKeyStrokes();
29 native function StopCapturingKeyStrokes(); 28 native function StopCapturingKeyStrokes();
30 29
31 // ======================================================================= 30 // =======================================================================
32 // Exported functions 31 // Exported functions
33 // ======================================================================= 32 // =======================================================================
34 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults); 33 this.__defineGetter__('displayInstantResults', GetDisplayInstantResults);
35 this.__defineGetter__('isFocused', IsFocused); 34 this.__defineGetter__('isFocused', IsFocused);
36 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled); 35 this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled);
37 this.__defineGetter__('rtl', GetRightToLeft); 36 this.__defineGetter__('rtl', GetRightToLeft);
(...skipping 24 matching lines...) Expand all
62 sizeInPx + ",,,,/" + item.renderViewId + "/" + item.rid; 61 sizeInPx + ",,,,/" + item.renderViewId + "/" + item.rid;
63 } 62 }
64 } 63 }
65 return item; 64 return item;
66 }; 65 };
67 66
68 this.paste = function(value) { 67 this.paste = function(value) {
69 Paste(value); 68 Paste(value);
70 }; 69 };
71 70
72 this.setVoiceSearchSupported = function(supported) {
73 SetVoiceSearchSupported(supported);
74 };
75
76 this.startCapturingKeyStrokes = function() { 71 this.startCapturingKeyStrokes = function() {
77 StartCapturingKeyStrokes(); 72 StartCapturingKeyStrokes();
78 }; 73 };
79 74
80 this.stopCapturingKeyStrokes = function() { 75 this.stopCapturingKeyStrokes = function() {
81 StopCapturingKeyStrokes(); 76 StopCapturingKeyStrokes();
82 }; 77 };
83 78
84 this.onfocuschange = null; 79 this.onfocuschange = null;
85 this.onkeycapturechange = null; 80 this.onkeycapturechange = null;
86 this.onmarginchange = null; 81 this.onmarginchange = null;
87 this.onsubmit = null; 82 this.onsubmit = null;
88 this.onsuggestionchange = null; 83 this.onsuggestionchange = null;
89 this.ontogglevoicesearch = null;
90 84
91 //TODO(jered): Remove this empty method when google no longer requires it. 85 //TODO(jered): Remove this empty method when google no longer requires it.
92 this.setRestrictedValue = function() {}; 86 this.setRestrictedValue = function() {};
93 }; 87 };
94 88
95 this.newTabPage = new function() { 89 this.newTabPage = new function() {
96 90
97 // ======================================================================= 91 // =======================================================================
98 // Private functions 92 // Private functions
99 // ======================================================================= 93 // =======================================================================
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 this.oninputcancel = null; 197 this.oninputcancel = null;
204 this.oninputstart = null; 198 this.oninputstart = null;
205 this.onmostvisitedchange = null; 199 this.onmostvisitedchange = null;
206 this.onthemechange = null; 200 this.onthemechange = null;
207 }; 201 };
208 202
209 // TODO(jered): Remove when google no longer expects this object. 203 // TODO(jered): Remove when google no longer expects this object.
210 chrome.searchBox = this.searchBox; 204 chrome.searchBox = this.searchBox;
211 }; 205 };
212 } 206 }
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