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

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

Issue 178253008: Redoing Issue 36073011: Allowing file:/// in Instant Extended's Most Visited links. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding and using logNavigation(); updating tests; removing ping and the log.html page. Created 6 years, 10 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 bba7b2850e41a51671b309887c97007ee9b53782..415f688cfdeed0649be2100c7012e3c482b2a03e 100644
--- a/chrome/renderer/resources/extensions/searchbox_api.js
+++ b/chrome/renderer/resources/extensions/searchbox_api.js
@@ -83,11 +83,13 @@ if (!chrome.embeddedSearch) {
native function CheckIsUserSignedInToChromeAs();
native function DeleteMostVisitedItem();
native function GetAppLauncherEnabled();
+ native function GetDispositionFromClick();
native function GetMostVisitedItems();
native function GetThemeBackgroundInfo();
native function IsInputInProgress();
native function LogEvent();
native function LogImpression();
+ native function LogNavigation();
native function NavigateContentWindow();
native function UndoAllMostVisitedDeletions();
native function UndoMostVisitedDeletion();
@@ -125,6 +127,18 @@ if (!chrome.embeddedSearch) {
DeleteMostVisitedItem(restrictedId);
};
+ this.getDispositionFromClick = function(middle_button,
+ alt_key,
+ ctrl_key,
+ meta_key,
+ shift_key) {
+ return GetDispositionFromClick(middle_button,
+ alt_key,
+ ctrl_key,
+ meta_key,
+ shift_key);
+ };
+
this.checkIsUserSignedIntoChromeAs = function(identity) {
CheckIsUserSignedInToChromeAs(identity);
};
@@ -141,6 +155,12 @@ if (!chrome.embeddedSearch) {
LogImpression(position, provider);
};
+ // This method is restricted to chrome-search://most-visited pages by
+ // checking the invoking context's origin in searchbox_extension.cc.
+ this.logNavigation = function(position, provider) {
+ LogNavigation(position, provider);
+ };
+
this.navigateContentWindow = function(destination, disposition) {
NavigateContentWindow(destination, disposition);
};

Powered by Google App Engine
This is Rietveld 408576698