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

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

Issue 23462014: InstantExtended: add back focus() API call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix semi-colon. Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ef5a8ddb9269276c50fa42dd9a707bff6acb0662..48a91883c18d910533856054146d780e48a02663 100644
--- a/chrome/renderer/resources/extensions/searchbox_api.js
+++ b/chrome/renderer/resources/extensions/searchbox_api.js
@@ -13,6 +13,7 @@ if (!chrome.embeddedSearch) {
// =======================================================================
// Private functions
// =======================================================================
+ native function Focus();
native function GetDisplayInstantResults();
native function GetFont();
native function GetFontSize();
@@ -41,6 +42,10 @@ if (!chrome.embeddedSearch) {
this.__defineGetter__('suggestion', GetSuggestionToPrefetch);
this.__defineGetter__('value', GetQuery);
+ this.focus = function() {
+ Focus();
+ };
+
// This method is restricted to chrome-search://most-visited pages by
// checking the invoking context's origin in searchbox_extension.cc.
this.getMostVisitedItemData = function(restrictedId) {
« no previous file with comments | « no previous file | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698