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

Unified Diff: Source/devtools/front_end/CPUProfilerModel.js

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! 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
« no previous file with comments | « Source/devtools/front_end/CPUProfileView.js ('k') | Source/devtools/front_end/CSSStyleModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/CPUProfilerModel.js
diff --git a/Source/devtools/front_end/CPUProfilerModel.js b/Source/devtools/front_end/CPUProfilerModel.js
index e7cf7193a4d3b82bcf2bc4d3202e3e5fdb822f4d..9afa3b6ae08e81ef35b88dc1634710d0aa3215dc 100644
--- a/Source/devtools/front_end/CPUProfilerModel.js
+++ b/Source/devtools/front_end/CPUProfilerModel.js
@@ -28,11 +28,14 @@
/**
* @constructor
- * @extends {WebInspector.Object}
+ * @extends {WebInspector.TargetAwareObject}
+ * @param {!WebInspector.Target} target
* @implements {ProfilerAgent.Dispatcher}
*/
-WebInspector.CPUProfilerModel = function()
+WebInspector.CPUProfilerModel = function(target)
{
+ WebInspector.TargetAwareObject.call(this, target);
+
/** @type {?WebInspector.CPUProfilerModel.Delegate} */
this._delegate = null;
this._isRecording = false;
@@ -64,7 +67,7 @@ WebInspector.CPUProfilerModel.prototype = {
{
// Make sure ProfilesPanel is initialized and CPUProfileType is created.
WebInspector.moduleManager.loadModule("profiles");
- this._delegate.consoleProfileFinished(id, scriptLocation, cpuProfile, title);
+ this._delegate.consoleProfileFinished(id, WebInspector.DebuggerModel.Location.fromPayload(this.target(), scriptLocation), cpuProfile, title);
},
/**
@@ -76,7 +79,7 @@ WebInspector.CPUProfilerModel.prototype = {
{
// Make sure ProfilesPanel is initialized and CPUProfileType is created.
WebInspector.moduleManager.loadModule("profiles");
- this._delegate.consoleProfileStarted(id, scriptLocation, title);
+ this._delegate.consoleProfileStarted(id, WebInspector.DebuggerModel.Location.fromPayload(this.target(), scriptLocation), title);
},
/**
@@ -98,7 +101,7 @@ WebInspector.CPUProfilerModel.prototype = {
return this._isRecording;
},
- __proto__: WebInspector.Object.prototype
+ __proto__: WebInspector.TargetAwareObject.prototype
}
/** @interface */
@@ -107,14 +110,14 @@ WebInspector.CPUProfilerModel.Delegate = function() {};
WebInspector.CPUProfilerModel.Delegate.prototype = {
/**
* @param {string} protocolId
- * @param {!DebuggerAgent.Location} scriptLocation
+ * @param {!WebInspector.DebuggerModel.Location} scriptLocation
* @param {string=} title
*/
consoleProfileStarted: function(protocolId, scriptLocation, title) {},
/**
* @param {string} protocolId
- * @param {!DebuggerAgent.Location} scriptLocation
+ * @param {!WebInspector.DebuggerModel.Location} scriptLocation
* @param {!ProfilerAgent.CPUProfile} cpuProfile
* @param {string=} title
*/
« no previous file with comments | « Source/devtools/front_end/CPUProfileView.js ('k') | Source/devtools/front_end/CSSStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698