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

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

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 * 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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 1097
1098 var startOffset = startTime - this._model.minimumRecordTime(); 1098 var startOffset = startTime - this._model.minimumRecordTime();
1099 var endOffset = endTime - this._model.minimumRecordTime(); 1099 var endOffset = endTime - this._model.minimumRecordTime();
1100 contentHelper.appendTextRow(WebInspector.UIString("Range"), WebInspector .UIString("%s \u2013 %s", Number.millisToString(startOffset), Number.millisToStr ing(endOffset))); 1100 contentHelper.appendTextRow(WebInspector.UIString("Range"), WebInspector .UIString("%s \u2013 %s", Number.millisToString(startOffset), Number.millisToStr ing(endOffset)));
1101 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Time"), pieChart); 1101 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Time"), pieChart);
1102 1102
1103 for (var i = 0; i < this._overviewControls.length; ++i) { 1103 for (var i = 0; i < this._overviewControls.length; ++i) {
1104 if (this._overviewControls[i] instanceof WebInspector.TimelinePowerO verview) { 1104 if (this._overviewControls[i] instanceof WebInspector.TimelinePowerO verview) {
1105 var energy = this._overviewControls[i].calculateEnergy(startTime , endTime); 1105 var energy = this._overviewControls[i].calculateEnergy(startTime , endTime);
1106 contentHelper.appendTextRow(WebInspector.UIString("Energy"), Web Inspector.UIString("%.2f Joules", energy)); 1106 contentHelper.appendTextRow(WebInspector.UIString("Energy"), Web Inspector.UIString("%.2f Joules", energy));
1107 contentHelper.appendTextRow(WebInspector.UIString("Accuracy"), W ebInspector.powerProfiler.getAccuracyLevel()); 1107 contentHelper.appendTextRow(WebInspector.UIString("Accuracy"), t his._overviewControls[i].accuracyLevel());
1108 break; 1108 break;
1109 } 1109 }
1110 } 1110 }
1111 this.showInDetails(contentHelper.element); 1111 this.showInDetails(contentHelper.element);
1112 }, 1112 },
1113 1113
1114 /** 1114 /**
1115 * @override 1115 * @override
1116 * @param {?WebInspector.TimelineSelection} selection 1116 * @param {?WebInspector.TimelineSelection} selection
1117 * @param {!WebInspector.TimelinePanel.DetailsTab=} preferredTab 1117 * @param {!WebInspector.TimelinePanel.DetailsTab=} preferredTab
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 WebInspector.TimelinePanelFactory.prototype = { 1502 WebInspector.TimelinePanelFactory.prototype = {
1503 /** 1503 /**
1504 * @override 1504 * @override
1505 * @return {!WebInspector.Panel} 1505 * @return {!WebInspector.Panel}
1506 */ 1506 */
1507 createPanel: function() 1507 createPanel: function()
1508 { 1508 {
1509 return WebInspector.TimelinePanel.instance(); 1509 return WebInspector.TimelinePanel.instance();
1510 } 1510 }
1511 } 1511 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/CountersGraph.js ('k') | Source/devtools/front_end/timeline/TimelinePowerGraph.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698