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

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

Issue 17226003: Add metrics for interactions with the Apps Launcher promo dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed gyp file. :-/ Created 7 years, 5 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 */ 115 */
116 function onLoad() { 116 function onLoad() {
117 sectionsToWaitFor = 0; 117 sectionsToWaitFor = 0;
118 if (loadTimeData.getBoolean('showMostvisited')) 118 if (loadTimeData.getBoolean('showMostvisited'))
119 sectionsToWaitFor++; 119 sectionsToWaitFor++;
120 if (loadTimeData.getBoolean('showApps')) { 120 if (loadTimeData.getBoolean('showApps')) {
121 sectionsToWaitFor++; 121 sectionsToWaitFor++;
122 if (loadTimeData.getBoolean('showAppLauncherPromo')) { 122 if (loadTimeData.getBoolean('showAppLauncherPromo')) {
123 $('app-launcher-promo-close-button').addEventListener('click', 123 $('app-launcher-promo-close-button').addEventListener('click',
124 function() { chrome.send('stopShowingAppLauncherPromo'); }); 124 function() { chrome.send('stopShowingAppLauncherPromo'); });
125 $('apps-promo-learn-more').addEventListener('click',
126 function() { chrome.send('onLearnMore'); });
125 } 127 }
126 } 128 }
127 if (loadTimeData.getBoolean('isDiscoveryInNTPEnabled')) 129 if (loadTimeData.getBoolean('isDiscoveryInNTPEnabled'))
128 sectionsToWaitFor++; 130 sectionsToWaitFor++;
129 measureNavDots(); 131 measureNavDots();
130 132
131 // Load the current theme colors. 133 // Load the current theme colors.
132 themeChanged(); 134 themeChanged();
133 135
134 newTabView = new NewTabView(); 136 newTabView = new NewTabView();
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 setFaviconDominantColor: setFaviconDominantColor, 695 setFaviconDominantColor: setFaviconDominantColor,
694 showNotification: showNotification, 696 showNotification: showNotification,
695 themeChanged: themeChanged, 697 themeChanged: themeChanged,
696 updateLogin: updateLogin 698 updateLogin: updateLogin
697 }; 699 };
698 }); 700 });
699 701
700 document.addEventListener('DOMContentLoaded', ntp.onLoad); 702 document.addEventListener('DOMContentLoaded', ntp.onLoad);
701 703
702 var toCssPx = cr.ui.toCssPx; 704 var toCssPx = cr.ui.toCssPx;
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/ui/webui/app_launcher_page_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698