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

Unified Diff: chrome/browser/resources/ntp4/most_visited_page.js

Issue 7610014: [ntp4] Bookmarks page implementation, first-pass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Final review tweaks, rebase. Created 9 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
Index: chrome/browser/resources/ntp4/most_visited_page.js
===================================================================
--- chrome/browser/resources/ntp4/most_visited_page.js (revision 96850)
+++ chrome/browser/resources/ntp4/most_visited_page.js (working copy)
@@ -84,7 +84,7 @@
}
var id = tileID++;
- this.setAttribute('id', 'tile' + id);
+ this.id = 'most-visited-tile-' + id;
this.data_ = data;
// TODO(estade): this shouldn't be focusable if the page isn't showing.
this.tabIndex = 0;
@@ -94,10 +94,12 @@
'chrome://favicon/size/32/' + data.url;
faviconDiv.style.backgroundImage = url(faviconUrl);
faviconDiv.dir = data.direction;
- if (data.faviconDominantColor)
+ if (data.faviconDominantColor) {
this.setStripeColor(data.faviconDominantColor);
- else
- chrome.send('getFaviconDominantColor', [faviconUrl, id]);
+ } else {
+ chrome.send('getFaviconDominantColor',
+ [faviconUrl, id, 'ntp4.setMostVisitedFaviconDominantColor']);
+ }
var title = this.querySelector('.title');
title.textContent = data.title;
@@ -427,8 +429,8 @@
return oldData;
};
- function setFaviconDominantColor(id, color) {
- var tile = $('tile' + id);
+ function setMostVisitedFaviconDominantColor(id, color) {
+ var tile = $('most-visited-tile-' + id);
if (tile)
tile.setStripeColor(color);
};
@@ -436,6 +438,6 @@
return {
MostVisitedPage: MostVisitedPage,
refreshData: refreshData,
- setFaviconDominantColor: setFaviconDominantColor,
+ setMostVisitedFaviconDominantColor: setMostVisitedFaviconDominantColor,
};
});

Powered by Google App Engine
This is Rietveld 408576698