Index: Source/devtools/front_end/Target.js |
diff --git a/Source/devtools/front_end/Target.js b/Source/devtools/front_end/Target.js |
index 1dc4c70318e28d6386b7f2e20710e2192ad73245..0e7a2b93e891b769b66767cbc8762229a9643c5f 100644 |
--- a/Source/devtools/front_end/Target.js |
+++ b/Source/devtools/front_end/Target.js |
@@ -17,6 +17,7 @@ WebInspector.Target = function(connection, callback) |
this.canInspectWorkers = false; |
this.pageAgent().canScreencast(this._initializeCapability.bind(this, "canScreencast", null)); |
+ this.powerAgent().canProfilePower(this._initializeCapability.bind(this, "canProfilePower", null)); |
pfeldman
2014/03/24 13:41:25
This should be queried behind the experiment check
Pan
2014/03/25 12:30:20
thanks, done
|
this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, "canInspectWorkers", this._loadedWithCapabilities.bind(this, callback))); |
// In case of loading as a web page with no bindings / harness, kick off initialization manually. |
@@ -59,6 +60,9 @@ WebInspector.Target.prototype = { |
this.workerManager = new WebInspector.WorkerManager(this.canInspectWorkers); |
WebInspector.workerManager = this.workerManager; |
+ if (WebInspector.experimentsSettings.powerProfiler.isEnabled() && this.canProfilePower) |
+ WebInspector.powerProfiler = new WebInspector.PowerProfiler(); |
+ |
if (callback) |
callback(this); |
}, |