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

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: Using KeyCaptureChange IPC for notification of focus change, and checking if it really changed in t… 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..9be33329589066c5221cfcbe87b6ba4bd109e9b9 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);
@@ -364,6 +366,7 @@ if (!chrome.embeddedSearch) {
this.onmostvisitedchange = null;
this.onthemechange = null;
+ this.onfocuschange = null;
samarth 2013/05/13 20:56:53 I think this better belongs in the searchbox part
Donn Denman 2013/05/13 23:44:50 Done.
};
// Export legacy searchbox API.

Powered by Google App Engine
This is Rietveld 408576698