| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 /** | 6 /** |
| 7 * @interface | 7 * @interface |
| 8 */ | 8 */ |
| 9 SDK.TracingManagerClient = function() {}; | 9 SDK.TracingManagerClient = function() {}; |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 */ | 23 */ |
| 24 eventsRetrievalProgress(progress) {} | 24 eventsRetrievalProgress(progress) {} |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * @unrestricted | 28 * @unrestricted |
| 29 */ | 29 */ |
| 30 SDK.TracingManager = class extends SDK.SDKModel { | 30 SDK.TracingManager = class extends SDK.SDKModel { |
| 31 /** | 31 /** |
| 32 * @param {!SDK.Target} target | 32 * @param {!SDK.Target} target |
| 33 * @param {!Protocol.Dispatcher} dispatcher |
| 33 */ | 34 */ |
| 34 constructor(target) { | 35 constructor(target, dispatcher) { |
| 35 super(target); | 36 super(target, dispatcher); |
| 36 this._tracingAgent = target.tracingAgent(); | 37 this._tracingAgent = dispatcher.tracingAgent(); |
| 37 target.registerTracingDispatcher(new SDK.TracingDispatcher(this)); | 38 dispatcher.registerTracingDispatcher(new SDK.TracingDispatcher(this)); |
| 38 | 39 |
| 39 /** @type {?SDK.TracingManagerClient} */ | 40 /** @type {?SDK.TracingManagerClient} */ |
| 40 this._activeClient = null; | 41 this._activeClient = null; |
| 41 this._eventBufferSize = 0; | 42 this._eventBufferSize = 0; |
| 42 this._eventsRetrieved = 0; | 43 this._eventsRetrieved = 0; |
| 43 } | 44 } |
| 44 | 45 |
| 45 /** | 46 /** |
| 46 * @param {number=} usage | 47 * @param {number=} usage |
| 47 * @param {number=} eventCount | 48 * @param {number=} eventCount |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 this._tracingManager._eventsCollected(data); | 154 this._tracingManager._eventsCollected(data); |
| 154 } | 155 } |
| 155 | 156 |
| 156 /** | 157 /** |
| 157 * @override | 158 * @override |
| 158 */ | 159 */ |
| 159 tracingComplete() { | 160 tracingComplete() { |
| 160 this._tracingManager._tracingComplete(); | 161 this._tracingManager._tracingComplete(); |
| 161 } | 162 } |
| 162 }; | 163 }; |
| OLD | NEW |