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

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 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);
},

Powered by Google App Engine
This is Rietveld 408576698