| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 224             return node.tagName == 'IMG' && | 224             return node.tagName == 'IMG' && | 
| 225                    /^data\:image\/(?:png|gif|jpe?g)/.test(value); | 225                    /^data\:image\/(?:png|gif|jpe?g)/.test(value); | 
| 226           }, | 226           }, | 
| 227         }; | 227         }; | 
| 228         showNotification(parseHtmlSubset(promo, tags, attrs), [], function() { | 228         showNotification(parseHtmlSubset(promo, tags, attrs), [], function() { | 
| 229           chrome.send('closeNotificationPromo'); | 229           chrome.send('closeNotificationPromo'); | 
| 230         }, 60000); | 230         }, 60000); | 
| 231         chrome.send('notificationPromoViewed'); | 231         chrome.send('notificationPromoViewed'); | 
| 232       } | 232       } | 
| 233 | 233 | 
|  | 234       cr.dispatchSimpleEvent(document, 'ntploaded', true, true); | 
| 234       document.documentElement.classList.remove('starting-up'); | 235       document.documentElement.classList.remove('starting-up'); | 
| 235     }); | 236     }); | 
| 236   } | 237   } | 
| 237 | 238 | 
| 238   /** | 239   /** | 
| 239    * Launches the chrome web store app with the chrome-ntp-launcher | 240    * Launches the chrome web store app with the chrome-ntp-launcher | 
| 240    * source. | 241    * source. | 
| 241    * @param {Event} e The click event. | 242    * @param {Event} e The click event. | 
| 242    */ | 243    */ | 
| 243   function onChromeWebStoreButtonClick(e) { | 244   function onChromeWebStoreButtonClick(e) { | 
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 616     setSuggestionsPages: setSuggestionsPages, | 617     setSuggestionsPages: setSuggestionsPages, | 
| 617     setRecentlyClosedTabs: setRecentlyClosedTabs, | 618     setRecentlyClosedTabs: setRecentlyClosedTabs, | 
| 618     setStripeColor: setStripeColor, | 619     setStripeColor: setStripeColor, | 
| 619     showNotification: showNotification, | 620     showNotification: showNotification, | 
| 620     themeChanged: themeChanged, | 621     themeChanged: themeChanged, | 
| 621     updateLogin: updateLogin | 622     updateLogin: updateLogin | 
| 622   }; | 623   }; | 
| 623 }); | 624 }); | 
| 624 | 625 | 
| 625 document.addEventListener('DOMContentLoaded', ntp.onLoad); | 626 document.addEventListener('DOMContentLoaded', ntp.onLoad); | 
| OLD | NEW | 
|---|