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

Side by Side Diff: chrome/browser/resources/new_tab.html

Issue 8052028: NTP: Clean up of MetricsHandler class and namespacing chrome.send messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tried to remove dependencies of metricshandler, most still necessary in NewTabUI Created 9 years, 2 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html i18n-values=" 2 <html i18n-values="
3 dir:textdirection; 3 dir:textdirection;
4 bookmarkbarattached:bookmarkbarattached; 4 bookmarkbarattached:bookmarkbarattached;
5 hasattribution:hasattribution; 5 hasattribution:hasattribution;
6 anim:anim; 6 anim:anim;
7 syncispresent:syncispresent; 7 syncispresent:syncispresent;
8 customlogo:customlogo" 8 customlogo:customlogo"
9 install-animation-enabled="true"> 9 install-animation-enabled="true">
10 <head> 10 <head>
11 <meta charset="utf-8"> 11 <meta charset="utf-8">
12 <title i18n-content="title"></title> 12 <title i18n-content="title"></title>
13 <script src="shared/js/util.js"></script> 13 <script src="shared/js/util.js"></script>
14 <script> 14 <script>
15 // Logging info for benchmarking purposes. 15 // Logging info for benchmarking purposes.
16 var log = []; 16 var log = [];
17 function logEvent(name, shouldLogTime) { 17 function logEvent(name, shouldLogTime) {
18 if (shouldLogTime) { 18 if (shouldLogTime) {
19 chrome.send('logEventTime', [name]); 19 chrome.send('metricsHandler:logEventTime', [name]);
20 } 20 }
21 log.push([name, Date.now()]); 21 log.push([name, Date.now()]);
22 } 22 }
23 logEvent('Tab.NewTabScriptStart', true); 23 logEvent('Tab.NewTabScriptStart', true);
24 24
25 /** 25 /**
26 * Registers a callback function so that if the backend calls it too early it 26 * Registers a callback function so that if the backend calls it too early it
27 * will get delayed until DOMContentLoaded is fired. 27 * will get delayed until DOMContentLoaded is fired.
28 * @param {string} name The name of the global function that the backend calls. 28 * @param {string} name The name of the global function that the backend calls.
29 */ 29 */
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 var recentlyClosedInitiallyMenu = shownSections & MENU_RECENT; 350 var recentlyClosedInitiallyMenu = shownSections & MENU_RECENT;
351 setSectionMenuMode('apps', Section.APPS, appsInitiallyMenu, MENU_APPS); 351 setSectionMenuMode('apps', Section.APPS, appsInitiallyMenu, MENU_APPS);
352 setSectionMenuMode('most-visited', Section.THUMB, mostVisitedInitiallyMenu, 352 setSectionMenuMode('most-visited', Section.THUMB, mostVisitedInitiallyMenu,
353 MENU_THUMB); 353 MENU_THUMB);
354 setSectionMenuMode('recently-closed', undefined, recentlyClosedInitiallyMenu, 354 setSectionMenuMode('recently-closed', undefined, recentlyClosedInitiallyMenu,
355 MENU_RECENT); 355 MENU_RECENT);
356 356
357 layoutSections(); 357 layoutSections();
358 </script> 358 </script>
359 </html> 359 </html>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp/most_visited.js » ('j') | chrome/browser/ui/webui/ntp/metrics_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698