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

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

Issue 15388002: Supporting high dpi favicons in Instant Extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Samarth's comments Created 7 years, 6 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 8a21d03203c9ac63829d20aad4507a5a1bfa1e2d..363abac41db824a7aae21d267042ae25f56cadf6 100644
--- a/chrome/renderer/resources/extensions/searchbox_api.js
+++ b/chrome/renderer/resources/extensions/searchbox_api.js
@@ -258,16 +258,24 @@ if (!chrome.embeddedSearch) {
function GetMostVisitedItemsWrapper() {
var mostVisitedItems = GetMostVisitedItems();
for (var i = 0, item; item = mostVisitedItems[i]; ++i) {
+ item.faviconUrl = UpdateFaviconUrl(item.renderViewId, item.rid);
// These properties are private data and should not be returned to
// the page. They are only accessible via getMostVisitedItemData().
item.url = null;
item.title = null;
item.domain = null;
item.direction = null;
+ item.renderViewId = null;
samarth 2013/06/20 00:31:29 Might as well also delete item.rid since that's no
pedro (no code reviews) 2013/06/20 22:43:45 As discussed offline, we actually need the rid, so
}
return mostVisitedItems;
}
+ function UpdateFaviconUrl(renderViewId, rid) {
samarth 2013/06/20 00:31:29 CreateFaviconUrl or ConstructFaviconUrl
pedro (no code reviews) 2013/06/20 22:43:45 Renamed to GenerateThumbnailURL to keep consistenc
+ return "chrome-search://favicon/size/16@" +
+ window.devicePixelRatio + "x/" +
+ renderViewId + "/" + rid;
+ }
+
// =======================================================================
// Exported functions
// =======================================================================

Powered by Google App Engine
This is Rietveld 408576698