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

Unified Diff: chrome/renderer/resources/extensions/searchbox_api.js

Issue 14646034: Add onfocuschange to the Extended Search API, with associated isFocused attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit tests Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/searchbox_api.js
diff --git a/chrome/renderer/resources/extensions/searchbox_api.js b/chrome/renderer/resources/extensions/searchbox_api.js
index bfc8405393304826956f1723304e610372783775..2a3f51b835fc3571bf6c2425eba68039372e54eb 100644
--- a/chrome/renderer/resources/extensions/searchbox_api.js
+++ b/chrome/renderer/resources/extensions/searchbox_api.js
@@ -94,6 +94,7 @@ if (!chrome.embeddedSearch) {
native function GetAutocompleteResults();
native function GetDisplayInstantResults();
native function GetFontSize();
+ native function IsFocused();
native function IsKeyCaptureEnabled();
native function SetQuery();
native function SetQueryFromAutocompleteResult();
@@ -229,6 +230,7 @@ if (!chrome.embeddedSearch) {
this.__defineGetter__('startMargin', GetStartMargin);
this.__defineGetter__('rtl', GetRightToLeft);
this.__defineGetter__('nativeSuggestions', GetAutocompleteResultsWrapper);
+ this.__defineGetter__('isFocused', IsFocused);
this.__defineGetter__('isKeyCaptureEnabled', IsKeyCaptureEnabled);
this.__defineGetter__('displayInstantResults', GetDisplayInstantResults);
this.__defineGetter__('font', GetFont);
@@ -295,6 +297,7 @@ if (!chrome.embeddedSearch) {
this.onmarginchange = null;
this.onnativesuggestions = null;
this.onbarshidden = null;
+ this.onfocuschange = null;
// DEPRECATED. These methods are from the legacy searchbox API.
// TODO(jered): Delete these.

Powered by Google App Engine
This is Rietveld 408576698