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

Unified Diff: chrome/browser/resources/ntp_search/new_tab.js

Issue 10829131: Refactoring NTP5: new implementation of TilePage and MostVisitedPage (which now inherits from Thumb… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing error during initialization Created 8 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/ntp_search/new_tab.js
diff --git a/chrome/browser/resources/ntp_search/new_tab.js b/chrome/browser/resources/ntp_search/new_tab.js
index 57c2a68277ff0996ddd7563015a54812f01e7edd..fd98387e7182219188e981bb6f8bc36cb3487895 100644
--- a/chrome/browser/resources/ntp_search/new_tab.js
+++ b/chrome/browser/resources/ntp_search/new_tab.js
@@ -87,7 +87,9 @@ cr.define('ntp', function() {
this.initialize(getRequiredElement('page-list'),
getRequiredElement('dot-list'),
getRequiredElement('card-slider-frame'),
+ // TODO(xci): remove the Trash component.
getRequiredElement('trash'),
+ // TODO(xci): remove page switchers.
pageSwitcherStart, pageSwitcherEnd);
}
@@ -445,17 +447,8 @@ cr.define('ntp', function() {
newTabView.suggestionsPage.data = data;
}
- /**
- * Set the dominant color for a node. This will be called in response to
- * getFaviconDominantColor. The node represented by |id| better have a setter
- * for stripeColor.
- * @param {string} id The ID of a node.
- * @param {string} color The color represented as a CSS string.
- */
- function setStripeColor(id, color) {
- var node = $(id);
- if (node)
- node.stripeColor = color;
+ function getThumbnailUrl(url) {
+ return 'chrome://thumb/' + url;
}
/**
@@ -573,6 +566,7 @@ cr.define('ntp', function() {
getAppsCallback: getAppsCallback,
getAppsPageIndex: getAppsPageIndex,
getCardSlider: getCardSlider,
+ getThumbnailUrl: getThumbnailUrl,
onLoad: onLoad,
leaveRearrangeMode: leaveRearrangeMode,
NtpFollowAction: NtpFollowAction,
@@ -583,7 +577,6 @@ cr.define('ntp', function() {
setMostVisitedPages: setMostVisitedPages,
setSuggestionsPages: setSuggestionsPages,
setRecentlyClosedTabs: setRecentlyClosedTabs,
- setStripeColor: setStripeColor,
showNotification: showNotification,
themeChanged: themeChanged,
updateLogin: updateLogin

Powered by Google App Engine
This is Rietveld 408576698