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

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

Issue 12771013: Instant: Make clicks on Most Visited items work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cancel Created 7 years, 9 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 | « chrome/browser/instant/instant_controller.cc ('k') | 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 d5d58afbbfd0f7cd9f5855ec06fc09226e307b5c..466299e06a95bb64a086511344158ba58fa9f162 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 GetFont();
+ // DEPRECATED. TODO(sreeram): Remove once google.com no longer uses this.
native function NavigateContentWindow();
function escapeHTML(text) {
@@ -64,6 +65,7 @@ if (!chrome.embeddedSearch) {
// =========================================================================
// Exported functions
// =========================================================================
+ // DEPRECATED. TODO(sreeram): Remove once google.com no longer uses this.
this.navigateContentWindow = function(destination, disposition) {
return NavigateContentWindow(destination, disposition);
};
@@ -102,6 +104,7 @@ if (!chrome.embeddedSearch) {
native function FocusOmnibox();
native function StartCapturingKeyStrokes();
native function StopCapturingKeyStrokes();
+ native function NavigateSearchBox();
function SafeWrapSuggestion(restrictedText) {
return SafeWrap(restrictedText, window.innerWidth - 155, 22);
@@ -239,14 +242,14 @@ if (!chrome.embeddedSearch) {
this.setAutocompleteText = function(text, behavior) {
SetQuerySuggestion(text, behavior);
};
- this.setRestrictedAutocompleteText = function(resultId) {
- SetQuerySuggestionFromAutocompleteResult(resultId);
+ this.setRestrictedAutocompleteText = function(autocompleteResultId) {
+ SetQuerySuggestionFromAutocompleteResult(autocompleteResultId);
};
this.setValue = function(text, type) {
SetQuery(text, type);
};
- this.setRestrictedValue = function(resultId) {
- SetQueryFromAutocompleteResult(resultId);
+ this.setRestrictedValue = function(autocompleteResultId) {
+ SetQueryFromAutocompleteResult(autocompleteResultId);
};
// TODO(jered): Remove the deprecated "reason" argument.
this.showOverlay = function(reason, height) {
@@ -266,6 +269,9 @@ if (!chrome.embeddedSearch) {
this.stopCapturingKeyStrokes = function() {
StopCapturingKeyStrokes();
};
+ this.navigateContentWindow = function(destination, disposition) {
+ NavigateSearchBox(destination, disposition);
+ }
this.onchange = null;
this.onsubmit = null;
this.oncancel = null;
@@ -298,6 +304,7 @@ if (!chrome.embeddedSearch) {
native function DeleteMostVisitedItem();
native function UndoAllMostVisitedDeletions();
native function UndoMostVisitedDeletion();
+ native function NavigateNewTabPage();
function SafeWrapMostVisited(restrictedText, width, opt_direction) {
return SafeWrap(restrictedText, width, 18, 11, opt_direction);
@@ -332,6 +339,9 @@ if (!chrome.embeddedSearch) {
this.undoMostVisitedDeletion = function(restrictId) {
UndoMostVisitedDeletion(restrictId);
};
+ this.navigateContentWindow = function(destination, disposition) {
+ NavigateNewTabPage(destination, disposition);
+ }
this.onmostvisitedchange = null;
this.onthemechange = null;
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698