| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.Object} | 7 * @extends {WebInspector.Object} |
| 8 */ | 8 */ |
| 9 WebInspector.TimelinePowerOverviewDataProvider = function() | 9 WebInspector.TimelinePowerOverviewDataProvider = function() |
| 10 { | 10 { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 | 102 |
| 103 WebInspector.TimelinePowerOverview.prototype = { | 103 WebInspector.TimelinePowerOverview.prototype = { |
| 104 dispose: function() | 104 dispose: function() |
| 105 { | 105 { |
| 106 this._dataProvider.dispose(); | 106 this._dataProvider.dispose(); |
| 107 }, | 107 }, |
| 108 | 108 |
| 109 timelineStarted: function() | 109 timelineStarted: function() |
| 110 { | 110 { |
| 111 if (Capabilities.canProfilePower) | 111 if (WebInspector.targetManager.activeTarget().hasCapability(WebInspector
.Target.Capabilities.canProfilePower)) |
| 112 WebInspector.powerProfiler.startProfile(); | 112 WebInspector.powerProfiler.startProfile(); |
| 113 }, | 113 }, |
| 114 | 114 |
| 115 timelineStopped: function() | 115 timelineStopped: function() |
| 116 { | 116 { |
| 117 if (Capabilities.canProfilePower) | 117 if (WebInspector.targetManager.activeTarget().hasCapability(WebInspector
.Target.Capabilities.canProfilePower)) |
| 118 WebInspector.powerProfiler.stopProfile(); | 118 WebInspector.powerProfiler.stopProfile(); |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 _resetPowerLabels: function() | 121 _resetPowerLabels: function() |
| 122 { | 122 { |
| 123 this._maxPowerLabel.textContent = ""; | 123 this._maxPowerLabel.textContent = ""; |
| 124 this._minPowerLabel.textContent = ""; | 124 this._minPowerLabel.textContent = ""; |
| 125 }, | 125 }, |
| 126 | 126 |
| 127 update: function() | 127 update: function() |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 */ | 208 */ |
| 209 calculateEnergy: function(minTime, maxTime) | 209 calculateEnergy: function(minTime, maxTime) |
| 210 { | 210 { |
| 211 return this._dataProvider._calculateEnergy(minTime, maxTime); | 211 return this._dataProvider._calculateEnergy(minTime, maxTime); |
| 212 }, | 212 }, |
| 213 | 213 |
| 214 __proto__: WebInspector.TimelineOverviewBase.prototype | 214 __proto__: WebInspector.TimelineOverviewBase.prototype |
| 215 } | 215 } |
| 216 | 216 |
| 217 | 217 |
| OLD | NEW |