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

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

Issue 400633003: DevTools: introduce multitarget model listeners (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * @constructor 2 * @constructor
3 * @extends {WebInspector.SDKObject} 3 * @extends {WebInspector.SDKModel}
4 * @param {!WebInspector.Target} target 4 * @param {!WebInspector.Target} target
5 */ 5 */
6 WebInspector.HeapProfilerModel = function(target) 6 WebInspector.HeapProfilerModel = function(target)
7 { 7 {
8 WebInspector.SDKObject.call(this, target); 8 WebInspector.SDKModel.call(this, WebInspector.HeapProfilerModel, target);
9 target.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatche r(this)); 9 target.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatche r(this));
10 this._enabled = false; 10 this._enabled = false;
11 this._heapProfilerAgent = target.heapProfilerAgent(); 11 this._heapProfilerAgent = target.heapProfilerAgent();
12 } 12 }
13 13
14 WebInspector.HeapProfilerModel.Events = { 14 WebInspector.HeapProfilerModel.Events = {
15 HeapStatsUpdate: "HeapStatsUpdate", 15 HeapStatsUpdate: "HeapStatsUpdate",
16 LastSeenObjectId: "LastSeenObjectId", 16 LastSeenObjectId: "LastSeenObjectId",
17 AddHeapSnapshotChunk: "AddHeapSnapshotChunk", 17 AddHeapSnapshotChunk: "AddHeapSnapshotChunk",
18 ReportHeapSnapshotProgress: "ReportHeapSnapshotProgress", 18 ReportHeapSnapshotProgress: "ReportHeapSnapshotProgress",
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 reportHeapSnapshotProgress: function(done, total, finished) 63 reportHeapSnapshotProgress: function(done, total, finished)
64 { 64 {
65 this.dispatchEventToListeners(WebInspector.HeapProfilerModel.Events.Repo rtHeapSnapshotProgress, {done: done, total: total, finished: finished}); 65 this.dispatchEventToListeners(WebInspector.HeapProfilerModel.Events.Repo rtHeapSnapshotProgress, {done: done, total: total, finished: finished});
66 }, 66 },
67 67
68 resetProfiles: function() 68 resetProfiles: function()
69 { 69 {
70 this.dispatchEventToListeners(WebInspector.HeapProfilerModel.Events.Rese tProfiles); 70 this.dispatchEventToListeners(WebInspector.HeapProfilerModel.Events.Rese tProfiles);
71 }, 71 },
72 72
73 __proto__: WebInspector.SDKObject.prototype 73 __proto__: WebInspector.SDKModel.prototype
74 } 74 }
75 75
76 76
77 /** 77 /**
78 * @constructor 78 * @constructor
79 * @implements {HeapProfilerAgent.Dispatcher} 79 * @implements {HeapProfilerAgent.Dispatcher}
80 */ 80 */
81 WebInspector.HeapProfilerDispatcher = function(model) 81 WebInspector.HeapProfilerDispatcher = function(model)
82 { 82 {
83 this._heapProfilerModel = model; 83 this._heapProfilerModel = model;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 reportHeapSnapshotProgress: function(done, total, finished) 118 reportHeapSnapshotProgress: function(done, total, finished)
119 { 119 {
120 this._heapProfilerModel.reportHeapSnapshotProgress(done, total, finished ); 120 this._heapProfilerModel.reportHeapSnapshotProgress(done, total, finished );
121 }, 121 },
122 122
123 resetProfiles: function() 123 resetProfiles: function()
124 { 124 {
125 this._heapProfilerModel.resetProfiles(); 125 this._heapProfilerModel.resetProfiles();
126 } 126 }
127 } 127 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/DebuggerModel.js ('k') | Source/devtools/front_end/sdk/NetworkManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698