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 |
} |