OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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('ntp', function() { | 5 cr.define('ntp', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 //---------------------------------------------------------------------------- | 8 //---------------------------------------------------------------------------- |
9 // Constants | 9 // Constants |
10 //---------------------------------------------------------------------------- | 10 //---------------------------------------------------------------------------- |
11 | 11 |
12 /** | 12 /** |
13 * Bottom Panel's minimum padding bottom, which is 57 (the height of bookmark | 13 * Bottom Panel's minimum padding bottom, which is 48 (the height of bookmark |
14 * bar in detached mode as defined by chrome::kNTPBookmarkBarHeight) minus 12 | 14 * bar in detached mode as defined by kSearchNewtabBookmarkBarHeight in |
15 * (top padding of a bookmark button). | 15 * chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc minus 12 (top |
| 16 * padding of a bookmark button). |
16 * @type {number} | 17 * @type {number} |
17 * @const | 18 * @const |
18 */ | 19 */ |
19 var BOTTOM_PANEL_MIN_PADDING_BOTTOM = 45; | 20 var BOTTOM_PANEL_MIN_PADDING_BOTTOM = 36; |
20 | 21 |
21 /** | 22 /** |
22 * The height required to show 2 rows of Tiles in the Bottom Panel. | 23 * The height required to show 2 rows of Tiles in the Bottom Panel. |
23 * @type {number} | 24 * @type {number} |
24 * @const | 25 * @const |
25 */ | 26 */ |
26 var HEIGHT_FOR_TWO_ROWS = 800; | 27 var HEIGHT_FOR_TWO_ROWS = 800; |
27 | 28 |
28 /** | 29 /** |
29 * The height required to show 1 row of Tiles with extra bottom padding. | 30 * The height required to show 1 row of Tiles with extra bottom padding. |
30 * @type {number} | 31 * @type {number} |
31 * @const | 32 * @const |
32 */ | 33 */ |
33 var HEIGHT_FOR_ONE_TALL_ROW = 700; | 34 var HEIGHT_FOR_ONE_TALL_ROW = 700; |
34 | 35 |
35 /** | 36 /** |
36 * The height required to show the Bottom Panel. | 37 * The height required to show the Bottom Panel. |
37 * @type {number} | 38 * @type {number} |
38 * @const | 39 * @const |
39 */ | 40 */ |
40 // TODO(pedrosimonetti): This value is related to | 41 // TODO(pedrosimonetti): This value is related to |
41 // kMinContentHeightForBottomBookmarkBar defined in chrome/browser/ui/search/ | 42 // kMinContentHeightForBottomBookmarkBar defined in chrome/browser/ui/search/ |
42 // search_ui.h. Change that value when calulation of bottom panel changes. | 43 // search_ui.h. Change that value when calulation of bottom panel changes. |
43 var HEIGHT_FOR_BOTTOM_PANEL = 600; | 44 var HEIGHT_FOR_BOTTOM_PANEL = 591; |
44 | 45 |
45 /** | 46 /** |
46 * The Bottom Panel width required to show 5 cols of Tiles, which is used | 47 * The Bottom Panel width required to show 5 cols of Tiles, which is used |
47 * in the width computation. | 48 * in the width computation. |
48 * @type {number} | 49 * @type {number} |
49 * @const | 50 * @const |
50 */ | 51 */ |
51 var MAX_BOTTOM_PANEL_WIDTH = 948; | 52 var MAX_BOTTOM_PANEL_WIDTH = 948; |
52 | 53 |
53 /** | 54 /** |
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 tile.scrollTop; | 1362 tile.scrollTop; |
1362 tile.classList.remove(className); | 1363 tile.classList.remove(className); |
1363 } | 1364 } |
1364 } | 1365 } |
1365 | 1366 |
1366 return { | 1367 return { |
1367 Tile: Tile, | 1368 Tile: Tile, |
1368 TilePage: TilePage, | 1369 TilePage: TilePage, |
1369 }; | 1370 }; |
1370 }); | 1371 }); |
OLD | NEW |