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

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: Created 8 years, 5 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..529bac88ce9a69bcaeeee09b0260b0dd0f5a2c24 100644
--- a/chrome/browser/resources/ntp_search/new_tab.js
+++ b/chrome/browser/resources/ntp_search/new_tab.js
@@ -188,6 +188,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_();
+
// Tell the slider about the pages.
newTabView.updateSliderCards();
// Mark the current page.
@@ -445,6 +451,10 @@ cr.define('ntp', function() {
newTabView.suggestionsPage.data = data;
}
+ function getThumbnailUrl(url) {
+ return 'chrome://thumb/' + url;
+ }
+
/**
* Set the dominant color for a node. This will be called in response to
* getFaviconDominantColor. The node represented by |id| better have a setter
@@ -583,6 +593,7 @@ cr.define('ntp', function() {
setMostVisitedPages: setMostVisitedPages,
setSuggestionsPages: setSuggestionsPages,
setRecentlyClosedTabs: setRecentlyClosedTabs,
+ getThumbnailUrl: getThumbnailUrl,
jeremycho_google 2012/08/02 00:19:11 alphabetize
pedrosimonetti2 2012/08/03 18:14:12 Done.
setStripeColor: setStripeColor,
showNotification: showNotification,
themeChanged: themeChanged,

Powered by Google App Engine
This is Rietveld 408576698