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

Unified Diff: Source/devtools/front_end/sdk/PowerProfiler.js

Issue 336713005: [Blink] [PowerProfiler] Support accuracy level attribute for power data provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing! Created 6 years, 6 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 | « no previous file | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/PowerProfiler.js
diff --git a/Source/devtools/front_end/sdk/PowerProfiler.js b/Source/devtools/front_end/sdk/PowerProfiler.js
index 63ff51e45c553f110aa5545c3b140b7c45c2bd08..0c079d999b4520edc67e9395635ee046d74814c1 100644
--- a/Source/devtools/front_end/sdk/PowerProfiler.js
+++ b/Source/devtools/front_end/sdk/PowerProfiler.js
@@ -10,6 +10,7 @@ WebInspector.PowerProfiler = function()
{
WebInspector.Object.call(this);
this._dispatcher = new WebInspector.PowerDispatcher(this);
+ PowerAgent.getAccuracyLevel(this._onAccuracyLevel.bind(this));
}
WebInspector.PowerProfiler.EventTypes = {
@@ -28,6 +29,20 @@ WebInspector.PowerProfiler.prototype = {
PowerAgent.end();
},
+ getAccuracyLevel: function()
+ {
+ return this._accuracyLevel;
+ },
+
+ _onAccuracyLevel: function(error, result) {
+ this._accuracyLevel = "";
+ if (error) {
+ console.log("Unable to retrieve PowerProfiler accuracy level: " + error);
+ return;
+ }
+ this._accuracyLevel = result;
+ },
+
__proto__: WebInspector.Object.prototype
}
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698