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..c7c06c2a501eb2382c461bdf4ef880ffe2c966ce 100644 |
--- a/chrome/browser/resources/ntp_search/new_tab.js |
+++ b/chrome/browser/resources/ntp_search/new_tab.js |
@@ -87,6 +87,7 @@ cr.define('ntp', function() { |
this.initialize(getRequiredElement('page-list'), |
getRequiredElement('dot-list'), |
getRequiredElement('card-slider-frame'), |
+ // TODO(xci): remove the Trash component. |
jeremycho_google
2012/08/03 20:51:24
and page switcher?
pedrosimonetti2
2012/08/03 22:02:39
Done.
|
getRequiredElement('trash'), |
pageSwitcherStart, pageSwitcherEnd); |
} |
@@ -188,6 +189,12 @@ cr.define('ntp', function() { |
chrome.send('initializeSyncLogin'); |
doWhenAllSectionsReady(function() { |
+ |
+ // TODO(xci) new! |
+ // TODO(pedrosimonetti): find a better place to put this code. Every, |
+ // card needs to call layout the first time is shown. |
+ newTabView.cardSlider.currentCardValue.layout_(); |
jeremycho_google
2012/08/03 21:14:27
On Linux Chrome, this is throwing a JS error each
pedrosimonetti2
2012/08/03 22:02:39
I think you mean ChromeOS because it works fine fo
jeremycho_google
2012/08/03 22:31:11
I'll take another look once this bug is fixed. Ot
|
+ |
// Tell the slider about the pages. |
newTabView.updateSliderCards(); |
// Mark the current page. |
@@ -445,17 +452,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 +571,7 @@ cr.define('ntp', function() { |
getAppsCallback: getAppsCallback, |
getAppsPageIndex: getAppsPageIndex, |
getCardSlider: getCardSlider, |
+ getThumbnailUrl: getThumbnailUrl, |
onLoad: onLoad, |
leaveRearrangeMode: leaveRearrangeMode, |
NtpFollowAction: NtpFollowAction, |
@@ -583,7 +582,6 @@ cr.define('ntp', function() { |
setMostVisitedPages: setMostVisitedPages, |
setSuggestionsPages: setSuggestionsPages, |
setRecentlyClosedTabs: setRecentlyClosedTabs, |
- setStripeColor: setStripeColor, |
showNotification: showNotification, |
themeChanged: themeChanged, |
updateLogin: updateLogin |