Chromium Code Reviews| 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 /** | 5 /** |
| 6 * @fileoverview New tab page | 6 * @fileoverview New tab page |
| 7 * This is the main code for the new tab page used by touch-enabled Chrome | 7 * This is the main code for the new tab page used by touch-enabled Chrome |
| 8 * browsers. For now this is still a prototype. | 8 * browsers. For now this is still a prototype. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 } | 325 } |
| 326 | 326 |
| 327 var menu = $('footer-menu-container'); | 327 var menu = $('footer-menu-container'); |
| 328 if (menu.clientWidth > logoImg.width) | 328 if (menu.clientWidth > logoImg.width) |
| 329 logo.style.WebkitFlex = '0 1 ' + menu.clientWidth + 'px'; | 329 logo.style.WebkitFlex = '0 1 ' + menu.clientWidth + 'px'; |
| 330 else | 330 else |
| 331 menu.style.WebkitFlex = '0 1 ' + logoImg.width + 'px'; | 331 menu.style.WebkitFlex = '0 1 ' + logoImg.width + 'px'; |
| 332 } | 332 } |
| 333 | 333 |
| 334 /** | 334 /** |
| 335 * Called when the theme has changed. | 335 * Called when the theme has changed. |
|
Dan Beam
2015/11/20 00:48:45
@param {Type=} opt_themeData Description.
Evan Stade
2015/11/20 22:05:17
Done.
| |
| 336 */ | 336 */ |
| 337 function themeChanged() { | 337 function themeChanged(opt_themeData) { |
| 338 $('themecss').href = 'chrome://theme/css/new_tab_theme.css?' + Date.now(); | 338 $('themecss').href = 'chrome://theme/css/new_tab_theme.css?' + Date.now(); |
| 339 } | 339 } |
| 340 | 340 |
| 341 function setBookmarkBarAttached(attached) { | 341 function setBookmarkBarAttached(attached) { |
| 342 document.documentElement.setAttribute('bookmarkbarattached', attached); | 342 document.documentElement.setAttribute('bookmarkbarattached', attached); |
| 343 } | 343 } |
| 344 | 344 |
| 345 /** | 345 /** |
| 346 * Timeout ID. | 346 * Timeout ID. |
| 347 * @type {number} | 347 * @type {number} |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 649 setFaviconDominantColor: setFaviconDominantColor, | 649 setFaviconDominantColor: setFaviconDominantColor, |
| 650 showNotification: showNotification, | 650 showNotification: showNotification, |
| 651 themeChanged: themeChanged, | 651 themeChanged: themeChanged, |
| 652 updateLogin: updateLogin | 652 updateLogin: updateLogin |
| 653 }; | 653 }; |
| 654 }); | 654 }); |
| 655 | 655 |
| 656 document.addEventListener('DOMContentLoaded', ntp.onLoad); | 656 document.addEventListener('DOMContentLoaded', ntp.onLoad); |
| 657 | 657 |
| 658 var toCssPx = cr.ui.toCssPx; | 658 var toCssPx = cr.ui.toCssPx; |
| OLD | NEW |