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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 chrome.send('notificationPromoClosed'); | 291 chrome.send('notificationPromoClosed'); |
292 }, 60000); | 292 }, 60000); |
293 chrome.send('notificationPromoViewed'); | 293 chrome.send('notificationPromoViewed'); |
294 } | 294 } |
295 | 295 |
296 cr.dispatchSimpleEvent(document, 'ntpLoaded', true, true); | 296 cr.dispatchSimpleEvent(document, 'ntpLoaded', true, true); |
297 document.documentElement.classList.remove('starting-up'); | 297 document.documentElement.classList.remove('starting-up'); |
298 | 298 |
299 startTime = Date.now(); | 299 startTime = Date.now(); |
300 }); | 300 }); |
301 | |
302 cr.ui.FocusManager.disableMouseFocusOnButtons(); | |
303 } | 301 } |
304 | 302 |
305 /** | 303 /** |
306 * Launches the chrome web store app with the chrome-ntp-launcher | 304 * Launches the chrome web store app with the chrome-ntp-launcher |
307 * source. | 305 * source. |
308 * @param {Event} e The click event. | 306 * @param {Event} e The click event. |
309 */ | 307 */ |
310 function onChromeWebStoreButtonClick(e) { | 308 function onChromeWebStoreButtonClick(e) { |
311 chrome.send('recordAppLaunchByURL', | 309 chrome.send('recordAppLaunchByURL', |
312 [encodeURIComponent(this.href), | 310 [encodeURIComponent(this.href), |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 setFaviconDominantColor: setFaviconDominantColor, | 781 setFaviconDominantColor: setFaviconDominantColor, |
784 showNotification: showNotification, | 782 showNotification: showNotification, |
785 themeChanged: themeChanged, | 783 themeChanged: themeChanged, |
786 updateLogin: updateLogin | 784 updateLogin: updateLogin |
787 }; | 785 }; |
788 }); | 786 }); |
789 | 787 |
790 document.addEventListener('DOMContentLoaded', ntp.onLoad); | 788 document.addEventListener('DOMContentLoaded', ntp.onLoad); |
791 | 789 |
792 var toCssPx = cr.ui.toCssPx; | 790 var toCssPx = cr.ui.toCssPx; |
OLD | NEW |