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

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: rebase 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
« no previous file with comments | « Source/devtools/front_end/Settings.js ('k') | Source/devtools/front_end/TimelineOverviewPane.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/Target.js
diff --git a/Source/devtools/front_end/Target.js b/Source/devtools/front_end/Target.js
index 2ed9f5be5608ef4dc3b408a5e522e0a9a4387154..46df2e8246dfdbe493bb42db70cd8d6dd2c1d7b5 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)));
}
@@ -65,6 +69,9 @@ WebInspector.Target.prototype = {
if (!WebInspector.workerManager)
WebInspector.workerManager = this.workerManager;
+ if (this.canProfilePower)
+ WebInspector.powerProfiler = new WebInspector.PowerProfiler();
+
if (callback)
callback(this);
},
« no previous file with comments | « Source/devtools/front_end/Settings.js ('k') | Source/devtools/front_end/TimelineOverviewPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698