| Index: third_party/WebKit/Source/devtools/front_end/sdk/TracingManager.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/TracingManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/TracingManager.js
|
| index 06f4e03ecfbe69b35b411b5f24b1eae53538838d..9e7af8e8046bcdcc18a2e1cd2ac61f864f708e0a 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/TracingManager.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/TracingManager.js
|
| @@ -27,12 +27,13 @@ SDK.TracingManagerClient.prototype = {
|
| /**
|
| * @unrestricted
|
| */
|
| -SDK.TracingManager = class {
|
| +SDK.TracingManager = class extends SDK.SDKModel {
|
| /**
|
| * @param {!SDK.Target} target
|
| */
|
| constructor(target) {
|
| - this._target = target;
|
| + super(target);
|
| + this._tracingAgent = target.tracingAgent();
|
| target.registerTracingDispatcher(new SDK.TracingDispatcher(this));
|
|
|
| /** @type {?SDK.TracingManagerClient} */
|
| @@ -42,13 +43,6 @@ SDK.TracingManager = class {
|
| }
|
|
|
| /**
|
| - * @return {?SDK.Target}
|
| - */
|
| - target() {
|
| - return this._target;
|
| - }
|
| -
|
| - /**
|
| * @param {number=} usage
|
| * @param {number=} eventCount
|
| * @param {number=} percentFull
|
| @@ -90,7 +84,7 @@ SDK.TracingManager = class {
|
| throw new Error('Tracing is already started');
|
| var bufferUsageReportingIntervalMs = 500;
|
| this._activeClient = client;
|
| - return this._target.tracingAgent().start(
|
| + return this._tracingAgent.start(
|
| categoryFilter, options, bufferUsageReportingIntervalMs, SDK.TracingManager.TransferMode.ReportEvents);
|
| }
|
|
|
| @@ -100,10 +94,12 @@ SDK.TracingManager = class {
|
| if (this._finishing)
|
| throw new Error('Tracing is already being stopped');
|
| this._finishing = true;
|
| - this._target.tracingAgent().end();
|
| + this._tracingAgent.end();
|
| }
|
| };
|
|
|
| +SDK.SDKModel.register(SDK.TracingManager, SDK.Target.Capability.Tracing);
|
| +
|
| /** @typedef {!{
|
| cat: string,
|
| pid: number,
|
|
|