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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * @unrestricted 2 * @unrestricted
3 */ 3 */
4 SDK.HeapProfilerModel = class extends SDK.SDKModel { 4 SDK.HeapProfilerModel = class extends SDK.SDKModel {
5 /** 5 /**
6 * @param {!SDK.Target} target 6 * @param {!SDK.Target} target
7 * @param {!Protocol.Dispatcher} dispatcher
7 */ 8 */
8 constructor(target) { 9 constructor(target, dispatcher) {
9 super(target); 10 super(target, dispatcher);
10 target.registerHeapProfilerDispatcher(new SDK.HeapProfilerDispatcher(this)); 11 dispatcher.registerHeapProfilerDispatcher(new SDK.HeapProfilerDispatcher(thi s));
11 this._enabled = false; 12 this._enabled = false;
12 this._heapProfilerAgent = target.heapProfilerAgent(); 13 this._heapProfilerAgent = dispatcher.heapProfilerAgent();
13 this._runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.Runt imeModel)); 14 this._runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.Runt imeModel));
14 } 15 }
15 16
16 /** 17 /**
17 * @return {!SDK.DebuggerModel} 18 * @return {!SDK.DebuggerModel}
18 */ 19 */
19 debuggerModel() { 20 debuggerModel() {
20 return this._runtimeModel.debuggerModel(); 21 return this._runtimeModel.debuggerModel();
21 } 22 }
22 23
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 this._heapProfilerModel.reportHeapSnapshotProgress(done, total, finished); 202 this._heapProfilerModel.reportHeapSnapshotProgress(done, total, finished);
202 } 203 }
203 204
204 /** 205 /**
205 * @override 206 * @override
206 */ 207 */
207 resetProfiles() { 208 resetProfiles() {
208 this._heapProfilerModel.resetProfiles(); 209 this._heapProfilerModel.resetProfiles();
209 } 210 }
210 }; 211 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698