| 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 localStrings = new LocalStrings; | 8 var localStrings = new LocalStrings; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 var TilePage = ntp4.TilePage; | 197 var TilePage = ntp4.TilePage; |
| 198 | 198 |
| 199 var bookmarksPageGridValues = { | 199 var bookmarksPageGridValues = { |
| 200 // The fewest tiles we will show in a row. | 200 // The fewest tiles we will show in a row. |
| 201 minColCount: 3, | 201 minColCount: 3, |
| 202 // The most tiles we will show in a row. | 202 // The most tiles we will show in a row. |
| 203 maxColCount: 6, | 203 maxColCount: 6, |
| 204 | 204 |
| 205 // The smallest a tile can be. | 205 // The smallest a tile can be. |
| 206 minTileWidth: 150, | 206 minTileWidth: 64, |
| 207 // The biggest a tile can be. | 207 // The biggest a tile can be. |
| 208 maxTileWidth: 150, | 208 maxTileWidth: 96, |
| 209 }; | 209 }; |
| 210 TilePage.initGridValues(bookmarksPageGridValues); | 210 TilePage.initGridValues(bookmarksPageGridValues); |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * Calculates the height for a bookmarks tile for a given width. The size | 213 * Calculates the height for a bookmarks tile for a given width. The size |
| 214 * is based on a desired size of 96x72 ratio. | 214 * is based on a desired size of 96x72 ratio. |
| 215 * @return {number} The height. | 215 * @return {number} The height. |
| 216 */ | 216 */ |
| 217 function heightForWidth(width) { | 217 function heightForWidth(width) { |
| 218 // The 2s are for borders, the 31 is for the title. | 218 // The 2s are for borders, the 31 is for the title. |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 tile.stripeColor = color; | 593 tile.stripeColor = color; |
| 594 } | 594 } |
| 595 | 595 |
| 596 return { | 596 return { |
| 597 BookmarksPage: BookmarksPage, | 597 BookmarksPage: BookmarksPage, |
| 598 initBookmarkChevron: initBookmarkChevron, | 598 initBookmarkChevron: initBookmarkChevron, |
| 599 }; | 599 }; |
| 600 }); | 600 }); |
| 601 | 601 |
| 602 window.addEventListener('load', ntp4.initBookmarkChevron); | 602 window.addEventListener('load', ntp4.initBookmarkChevron); |
| OLD | NEW |