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

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: 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') | Source/devtools/protocol.json » ('J')
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..315f306686bf228cfd23f2710b1aac992901d5b0 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.accuracyLevel(this._onAccuracyLevel.bind(this));
}
WebInspector.PowerProfiler.EventTypes = {
@@ -28,6 +29,18 @@ WebInspector.PowerProfiler.prototype = {
PowerAgent.end();
},
+ accuracyLevel: function()
+ {
+ return this._accuracyLevel;
+ },
+
+ _onAccuracyLevel: function(error, result) {
+ this._accuracyLevel = "";
+ if (error)
+ return;
yurys 2014/06/17 07:38:39 You might want to print the error in the console t
+ this._accuracyLevel = result;
+ },
+
__proto__: WebInspector.Object.prototype
}
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | Source/devtools/protocol.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698