Index: Source/devtools/front_end/Target.js |
diff --git a/Source/devtools/front_end/Target.js b/Source/devtools/front_end/Target.js |
index 701c6435bc4cc544d1e230437509517d6f425c3b..849575aab19918fa777fba475a9584413eca13b7 100644 |
--- a/Source/devtools/front_end/Target.js |
+++ b/Source/devtools/front_end/Target.js |
@@ -17,6 +17,10 @@ WebInspector.Target = function(connection, callback) |
this.isMainFrontend = false; |
this.pageAgent().canScreencast(this._initializeCapability.bind(this, "canScreencast", null)); |
+ |
+ if (WebInspector.experimentsSettings.powerProfiler.isEnabled()) |
+ this.powerAgent().canProfilePower(this._initializeCapability.bind(this, "canProfilePower", null)); |
+ |
this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, "isMainFrontend", this._loadedWithCapabilities.bind(this, callback))); |
} |
@@ -66,6 +70,9 @@ WebInspector.Target.prototype = { |
if (!WebInspector.workerManager) |
WebInspector.workerManager = this.workerManager; |
+ if (this.canProfilePower) |
+ WebInspector.powerProfiler = new WebInspector.PowerProfiler(); |
+ |
if (callback) |
callback(this); |
}, |