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

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: verbatim 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
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..89431e38f2dbccea95a7471f6af8e3d72d5d86b6 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);
@@ -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 | « no previous file | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | chrome/renderer/searchbox/searchbox_extension.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698