| 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 * @constructor | 6 * @constructor |
| 7 * @param {!WebInspector.Target} target | 7 * @param {!WebInspector.Target} target |
| 8 * @param {!WebInspector.TimelineLifecycleDelegate} delegate | 8 * @param {!WebInspector.TimelineLifecycleDelegate} delegate |
| 9 * @param {!WebInspector.TracingModel} tracingModel | 9 * @param {!WebInspector.TracingModel} tracingModel |
| 10 * @implements {WebInspector.TargetManager.Observer} | 10 * @implements {WebInspector.TargetManager.Observer} |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 */ | 165 */ |
| 166 _startRecordingWithCategories: function(categories, enableJSSampling, callba
ck) | 166 _startRecordingWithCategories: function(categories, enableJSSampling, callba
ck) |
| 167 { | 167 { |
| 168 WebInspector.targetManager.suspendAllTargets(); | 168 WebInspector.targetManager.suspendAllTargets(); |
| 169 var profilingStartedPromise = enableJSSampling && !Runtime.experiments.i
sEnabled("timelineTracingJSProfile") ? | 169 var profilingStartedPromise = enableJSSampling && !Runtime.experiments.i
sEnabled("timelineTracingJSProfile") ? |
| 170 this._startProfilingOnAllTargets() : Promise.resolve(); | 170 this._startProfilingOnAllTargets() : Promise.resolve(); |
| 171 var samplingFrequencyHz = WebInspector.moduleSetting("highResolutionCpuP
rofiling").get() ? 10000 : 1000; | 171 var samplingFrequencyHz = WebInspector.moduleSetting("highResolutionCpuP
rofiling").get() ? 10000 : 1000; |
| 172 var options = "sampling-frequency=" + samplingFrequencyHz; | 172 var options = "sampling-frequency=" + samplingFrequencyHz; |
| 173 var target = this._target; | 173 var target = this._target; |
| 174 var tracingManager = target.tracingManager; | 174 var tracingManager = target.tracingManager; |
| 175 target.resourceTreeModel.suspendReload(); | 175 WebInspector.targetManager.suspendReload(target); |
| 176 profilingStartedPromise.then(tracingManager.start.bind(tracingManager, t
his, categories, options, onTraceStarted)); | 176 profilingStartedPromise.then(tracingManager.start.bind(tracingManager, t
his, categories, options, onTraceStarted)); |
| 177 /** | 177 /** |
| 178 * @param {?string} error | 178 * @param {?string} error |
| 179 */ | 179 */ |
| 180 function onTraceStarted(error) | 180 function onTraceStarted(error) |
| 181 { | 181 { |
| 182 target.resourceTreeModel.resumeReload(); | 182 WebInspector.targetManager.resumeReload(target); |
| 183 if (callback) | 183 if (callback) |
| 184 callback(error); | 184 callback(error); |
| 185 } | 185 } |
| 186 }, | 186 }, |
| 187 | 187 |
| 188 /** | 188 /** |
| 189 * @override | 189 * @override |
| 190 */ | 190 */ |
| 191 tracingStarted: function() | 191 tracingStarted: function() |
| 192 { | 192 { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 278 |
| 279 /** | 279 /** |
| 280 * @param {number} progress | 280 * @param {number} progress |
| 281 * @override | 281 * @override |
| 282 */ | 282 */ |
| 283 eventsRetrievalProgress: function(progress) | 283 eventsRetrievalProgress: function(progress) |
| 284 { | 284 { |
| 285 this._delegate.loadingProgress(progress); | 285 this._delegate.loadingProgress(progress); |
| 286 } | 286 } |
| 287 } | 287 } |
| OLD | NEW |