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

Side by Side Diff: chrome/browser/resources/new_new_tab.js

Issue 242107: Add histograms that track how long it takes to open the new tab page. (Closed)
Patch Set: comments Created 11 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
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Helpers 2 // Helpers
3 3
4 function $(id) { 4 function $(id) {
5 return document.getElementById(id); 5 return document.getElementById(id);
6 } 6 }
7 7
8 // TODO(arv): Remove these when classList is available in HTML5. 8 // TODO(arv): Remove these when classList is available in HTML5.
9 // https://bugs.webkit.org/show_bug.cgi?id=20709 9 // https://bugs.webkit.org/show_bug.cgi?id=20709
10 function hasClass(el, name) { 10 function hasClass(el, name) {
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 1321
1322 $('thumb-checkbox').addEventListener('change', 1322 $('thumb-checkbox').addEventListener('change',
1323 getCheckboxHandler(Section.THUMB)); 1323 getCheckboxHandler(Section.THUMB));
1324 $('thumb-checkbox').addEventListener('keydown', 1324 $('thumb-checkbox').addEventListener('keydown',
1325 getCheckboxHandler(Section.THUMB)); 1325 getCheckboxHandler(Section.THUMB));
1326 $('list-checkbox').addEventListener('change', 1326 $('list-checkbox').addEventListener('change',
1327 getCheckboxHandler(Section.LIST)); 1327 getCheckboxHandler(Section.LIST));
1328 $('list-checkbox').addEventListener('keydown', 1328 $('list-checkbox').addEventListener('keydown',
1329 getCheckboxHandler(Section.LIST)); 1329 getCheckboxHandler(Section.LIST));
1330 1330
1331 window.addEventListener('load', bind(logEvent, global, 'onload fired')); 1331 window.addEventListener('load', bind(logEvent, global, 'NewTab.Onload', true));
1332 window.addEventListener('load', onDataLoaded); 1332 window.addEventListener('load', onDataLoaded);
1333
1333 window.addEventListener('resize', handleWindowResize); 1334 window.addEventListener('resize', handleWindowResize);
1334 document.addEventListener('DOMContentLoaded', bind(logEvent, global, 1335 document.addEventListener('DOMContentLoaded',
1335 'domcontentloaded fired')); 1336 bind(logEvent, global, 'NewTab.DOMContentLoaded', true));
1336 1337
1337 // Whether or not we should send the initial 'GetSyncMessage' to the backend 1338 // Whether or not we should send the initial 'GetSyncMessage' to the backend
1338 // depends on the value of the attribue 'syncispresent' which the backend sets 1339 // depends on the value of the attribue 'syncispresent' which the backend sets
1339 // to indicate if there is code in the backend which is capable of processing 1340 // to indicate if there is code in the backend which is capable of processing
1340 // this message. This attribute is loaded by the JSTemplate and therefore we 1341 // this message. This attribute is loaded by the JSTemplate and therefore we
1341 // must make sure we check the attribute after the DOM is loaded. 1342 // must make sure we check the attribute after the DOM is loaded.
1342 document.addEventListener('DOMContentLoaded', 1343 document.addEventListener('DOMContentLoaded',
1343 callGetSyncMessageIfSyncIsPresent); 1344 callGetSyncMessageIfSyncIsPresent);
1344 1345
1345 // This link allows user to make new tab page as homepage from the new tab 1346 // This link allows user to make new tab page as homepage from the new tab
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 function fixLinkUnderline(el) { 1682 function fixLinkUnderline(el) {
1682 var span = document.createElement('span'); 1683 var span = document.createElement('span');
1683 span.className = 'link-color'; 1684 span.className = 'link-color';
1684 while (el.hasChildNodes()) { 1685 while (el.hasChildNodes()) {
1685 span.appendChild(el.firstChild); 1686 span.appendChild(el.firstChild);
1686 } 1687 }
1687 el.appendChild(span); 1688 el.appendChild(span);
1688 } 1689 }
1689 1690
1690 updateAttribution(); 1691 updateAttribution();
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698