OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 cr.define('ntp4', function() { | 5 cr.define('ntp4', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 var TilePage = ntp4.TilePage; | 8 var TilePage = ntp4.TilePage; |
9 | 9 |
10 /** | 10 /** |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 }; | 230 }; |
231 | 231 |
232 var mostVisitedPageGridValues = { | 232 var mostVisitedPageGridValues = { |
233 // The fewest tiles we will show in a row. | 233 // The fewest tiles we will show in a row. |
234 minColCount: 2, | 234 minColCount: 2, |
235 // The most tiles we will show in a row. | 235 // The most tiles we will show in a row. |
236 maxColCount: 4, | 236 maxColCount: 4, |
237 | 237 |
238 // TODO(estade): Change these to real values. | 238 // TODO(estade): Change these to real values. |
239 // The smallest a tile can be. | 239 // The smallest a tile can be. |
240 minTileWidth: 200, | 240 minTileWidth: 122, |
241 // The biggest a tile can be. | 241 // The biggest a tile can be. |
242 maxTileWidth: 240, | 242 maxTileWidth: 240, |
243 }; | 243 }; |
244 TilePage.initGridValues(mostVisitedPageGridValues); | 244 TilePage.initGridValues(mostVisitedPageGridValues); |
245 | 245 |
246 /** | 246 /** |
247 * Calculates the height for a Most Visited tile for a given width. The size | 247 * Calculates the height for a Most Visited tile for a given width. The size |
248 * is based on the thumbnail, which should have a 212:132 ratio. | 248 * is based on the thumbnail, which should have a 212:132 ratio. |
249 * @return {number} The height. | 249 * @return {number} The height. |
250 */ | 250 */ |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 if (tile) | 432 if (tile) |
433 tile.setStripeColor(color); | 433 tile.setStripeColor(color); |
434 }; | 434 }; |
435 | 435 |
436 return { | 436 return { |
437 MostVisitedPage: MostVisitedPage, | 437 MostVisitedPage: MostVisitedPage, |
438 refreshData: refreshData, | 438 refreshData: refreshData, |
439 setFaviconDominantColor: setFaviconDominantColor, | 439 setFaviconDominantColor: setFaviconDominantColor, |
440 }; | 440 }; |
441 }); | 441 }); |
OLD | NEW |