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

Unified Diff: Source/devtools/front_end/Target.js

Issue 104523002: [DevTools] Add power profiler and power overview in timeline panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
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);
},

Powered by Google App Engine
This is Rietveld 408576698