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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js
index c5a2d615acc1a983aff49b0bfd549f31e355a27b..4072b7293a1841fa4cc7389ffc7bed4e0660eee3 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js
@@ -32,14 +32,15 @@
SDK.CPUProfilerModel = class extends SDK.SDKModel {
/**
* @param {!SDK.Target} target
+ * @param {!Protocol.Dispatcher} dispatcher
*/
- constructor(target) {
- super(target);
+ constructor(target, dispatcher) {
+ super(target, dispatcher);
this._isRecording = false;
this._nextAnonymousConsoleProfileNumber = 1;
this._anonymousConsoleProfileIdToTitle = new Map();
- this._profilerAgent = target.profilerAgent();
- target.registerProfilerDispatcher(this);
+ this._profilerAgent = dispatcher.profilerAgent();
+ dispatcher.registerProfilerDispatcher(this);
this._profilerAgent.enable();
this._debuggerModel = /** @type {!SDK.DebuggerModel} */ (target.model(SDK.DebuggerModel));
}

Powered by Google App Engine
This is Rietveld 408576698