| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 function setBookmarkBarAttached(attached) { | 382 function setBookmarkBarAttached(attached) { |
| 383 document.documentElement.setAttribute('bookmarkbarattached', attached); | 383 document.documentElement.setAttribute('bookmarkbarattached', attached); |
| 384 } | 384 } |
| 385 | 385 |
| 386 /** | 386 /** |
| 387 * Attributes the attribution image at the bottom left. | 387 * Attributes the attribution image at the bottom left. |
| 388 */ | 388 */ |
| 389 function updateAttribution() { | 389 function updateAttribution() { |
| 390 var attribution = $('attribution'); | 390 var attribution = $('attribution'); |
| 391 if (document.documentElement.getAttribute('hasattribution') == 'true') { | 391 if (document.documentElement.getAttribute('hasattribution') == 'true') { |
| 392 $('attribution-img').src = | |
| 393 'chrome://theme/IDR_THEME_NTP_ATTRIBUTION?' + Date.now(); | |
| 394 attribution.hidden = false; | 392 attribution.hidden = false; |
| 395 } else { | 393 } else { |
| 396 attribution.hidden = true; | 394 attribution.hidden = true; |
| 397 } | 395 } |
| 398 } | 396 } |
| 399 | 397 |
| 400 /** | 398 /** |
| 401 * Timeout ID. | 399 * Timeout ID. |
| 402 * @type {number} | 400 * @type {number} |
| 403 */ | 401 */ |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 setFaviconDominantColor: setFaviconDominantColor, | 692 setFaviconDominantColor: setFaviconDominantColor, |
| 695 showNotification: showNotification, | 693 showNotification: showNotification, |
| 696 themeChanged: themeChanged, | 694 themeChanged: themeChanged, |
| 697 updateLogin: updateLogin | 695 updateLogin: updateLogin |
| 698 }; | 696 }; |
| 699 }); | 697 }); |
| 700 | 698 |
| 701 document.addEventListener('DOMContentLoaded', ntp.onLoad); | 699 document.addEventListener('DOMContentLoaded', ntp.onLoad); |
| 702 | 700 |
| 703 var toCssPx = cr.ui.toCssPx; | 701 var toCssPx = cr.ui.toCssPx; |
| OLD | NEW |