Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 10182006: Adds the MostVisitedAction stat. This stat will provide a baseline to compare (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync'ed. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698