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

Side by Side Diff: Source/devtools/front_end/TimelinePanel.js

Issue 236083009: Fix lint error in TimelinePanel.js due to 'energy' variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 aggregatedStats["idle"] = Math.max(0, endTime - startTime - aggregatedTo tal); 923 aggregatedStats["idle"] = Math.max(0, endTime - startTime - aggregatedTo tal);
924 924
925 var fragment = document.createDocumentFragment(); 925 var fragment = document.createDocumentFragment();
926 fragment.appendChild(WebInspector.TimelineUIUtils.generatePieChart(aggre gatedStats)); 926 fragment.appendChild(WebInspector.TimelineUIUtils.generatePieChart(aggre gatedStats));
927 var startOffset = startTime - this._model.minimumRecordTime(); 927 var startOffset = startTime - this._model.minimumRecordTime();
928 var endOffset = endTime - this._model.minimumRecordTime(); 928 var endOffset = endTime - this._model.minimumRecordTime();
929 var title = WebInspector.UIString("%s \u2013 %s", Number.millisToString( startOffset), Number.millisToString(endOffset)); 929 var title = WebInspector.UIString("%s \u2013 %s", Number.millisToString( startOffset), Number.millisToString(endOffset));
930 930
931 if (Capabilities.canProfilePower) { 931 if (Capabilities.canProfilePower) {
932 var powerOverview = /** @type {!WebInspector.TimelinePowerOverview} */ (this._viewsForMode(WebInspector.TimelinePanel.Mode.Power).overviewView); 932 var powerOverview = /** @type {!WebInspector.TimelinePowerOverview} */ (this._viewsForMode(WebInspector.TimelinePanel.Mode.Power).overviewView);
933 energy = powerOverview.calculateEnergy(startTime, endTime); 933 var energy = powerOverview.calculateEnergy(startTime, endTime);
934 title += WebInspector.UIString(" Energy: %.2f Joules", energy); 934 title += WebInspector.UIString(" Energy: %.2f Joules", energy);
935 } 935 }
936 this._detailsView.setContent(title, fragment); 936 this._detailsView.setContent(title, fragment);
937 }, 937 },
938 938
939 /** 939 /**
940 * @param {?WebInspector.TimelineModel.Record} record 940 * @param {?WebInspector.TimelineModel.Record} record
941 */ 941 */
942 selectRecord: function(record) 942 selectRecord: function(record)
943 { 943 {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 * @param {!WebInspector.TimelineModel.Record} record 1219 * @param {!WebInspector.TimelineModel.Record} record
1220 * @return {boolean} 1220 * @return {boolean}
1221 */ 1221 */
1222 accept: function(record) 1222 accept: function(record)
1223 { 1223 {
1224 return !this._hiddenRecords[record.type]; 1224 return !this._hiddenRecords[record.type];
1225 }, 1225 },
1226 1226
1227 __proto__: WebInspector.TimelineModel.Filter.prototype 1227 __proto__: WebInspector.TimelineModel.Filter.prototype
1228 } 1228 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698