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