OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @implements {SDK.SDKModelObserver<!SDK.CPUProfilerModel>} | 6 * @implements {SDK.SDKModelObserver<!SDK.CPUProfilerModel>} |
7 * @implements {SDK.TracingManagerClient} | 7 * @implements {SDK.TracingManagerClient} |
8 * @unrestricted | 8 * @unrestricted |
9 */ | 9 */ |
10 Timeline.TimelineController = class { | 10 Timeline.TimelineController = class { |
(...skipping 11 matching lines...) Expand all Loading... |
22 this._tracingModel = new SDK.TracingModel(this._tracingModelBackingStorage); | 22 this._tracingModel = new SDK.TracingModel(this._tracingModelBackingStorage); |
23 | 23 |
24 this._performanceModel.setMainTarget(tracingManager.target()); | 24 this._performanceModel.setMainTarget(tracingManager.target()); |
25 | 25 |
26 /** @type {!Array<!Timeline.ExtensionTracingSession>} */ | 26 /** @type {!Array<!Timeline.ExtensionTracingSession>} */ |
27 this._extensionSessions = []; | 27 this._extensionSessions = []; |
28 SDK.targetManager.observeModels(SDK.CPUProfilerModel, this); | 28 SDK.targetManager.observeModels(SDK.CPUProfilerModel, this); |
29 } | 29 } |
30 | 30 |
31 /** | 31 /** |
| 32 * @return {!SDK.Target} |
| 33 */ |
| 34 mainTarget() { |
| 35 return this._tracingManager.target(); |
| 36 } |
| 37 |
| 38 /** |
32 * @param {!Timeline.TimelineController.RecordingOptions} options | 39 * @param {!Timeline.TimelineController.RecordingOptions} options |
33 * @param {!Array<!Extensions.ExtensionTraceProvider>} providers | 40 * @param {!Array<!Extensions.ExtensionTraceProvider>} providers |
34 * @return {!Promise} | 41 * @return {!Promise} |
35 */ | 42 */ |
36 startRecording(options, providers) { | 43 startRecording(options, providers) { |
37 this._extensionTraceProviders = Extensions.extensionServer.traceProviders().
slice(); | 44 this._extensionTraceProviders = Extensions.extensionServer.traceProviders().
slice(); |
38 | 45 |
39 /** | 46 /** |
40 * @param {string} category | 47 * @param {string} category |
41 * @return {string} | 48 * @return {string} |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 }; | 279 }; |
273 | 280 |
274 /** | 281 /** |
275 * @typedef {!{ | 282 * @typedef {!{ |
276 * enableJSSampling: (boolean|undefined), | 283 * enableJSSampling: (boolean|undefined), |
277 * capturePictures: (boolean|undefined), | 284 * capturePictures: (boolean|undefined), |
278 * captureFilmStrip: (boolean|undefined) | 285 * captureFilmStrip: (boolean|undefined) |
279 * }} | 286 * }} |
280 */ | 287 */ |
281 Timeline.TimelineController.RecordingOptions; | 288 Timeline.TimelineController.RecordingOptions; |
OLD | NEW |