OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |