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

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

Issue 274057: Add histogram for how tab closing time. Did some cleanup along the way. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
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, 'NewTab.Onload', true)); 1331 window.addEventListener('load', bind(logEvent, global, 'Tab.NewTabOnload', true) );
1332 window.addEventListener('load', onDataLoaded); 1332 window.addEventListener('load', onDataLoaded);
1333 1333
1334 window.addEventListener('resize', handleWindowResize); 1334 window.addEventListener('resize', handleWindowResize);
1335 document.addEventListener('DOMContentLoaded', 1335 document.addEventListener('DOMContentLoaded',
1336 bind(logEvent, global, 'NewTab.DOMContentLoaded', true)); 1336 bind(logEvent, global, 'Tab.NewTabDOMContentLoaded', true));
1337 1337
1338 // 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
1339 // 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
1340 // 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
1341 // 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
1342 // 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.
1343 document.addEventListener('DOMContentLoaded', 1343 document.addEventListener('DOMContentLoaded',
1344 callGetSyncMessageIfSyncIsPresent); 1344 callGetSyncMessageIfSyncIsPresent);
1345 1345
1346 // 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
1682 function fixLinkUnderline(el) { 1682 function fixLinkUnderline(el) {
1683 var span = document.createElement('span'); 1683 var span = document.createElement('span');
1684 span.className = 'link-color'; 1684 span.className = 'link-color';
1685 while (el.hasChildNodes()) { 1685 while (el.hasChildNodes()) {
1686 span.appendChild(el.firstChild); 1686 span.appendChild(el.firstChild);
1687 } 1687 }
1688 el.appendChild(span); 1688 el.appendChild(span);
1689 } 1689 }
1690 1690
1691 updateAttribution(); 1691 updateAttribution();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698