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

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

Issue 388963004: DevTools: get rid of the global capabilities set. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 6 years, 5 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
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | 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 // 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
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
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
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698