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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] No RTM for non-browser targets Created 4 years, 4 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
OLDNEW
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
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 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target );
176 if (resourceTreeModel)
177 resourceTreeModel.suspendReload();
dgozman 2016/08/19 20:23:37 Didn't we agree to move suspend/resume to target m
eostroukhov 2016/08/20 01:22:31 Done.
176 profilingStartedPromise.then(tracingManager.start.bind(tracingManager, t his, categories, options, onTraceStarted)); 178 profilingStartedPromise.then(tracingManager.start.bind(tracingManager, t his, categories, options, onTraceStarted));
177 /** 179 /**
178 * @param {?string} error 180 * @param {?string} error
179 */ 181 */
180 function onTraceStarted(error) 182 function onTraceStarted(error)
181 { 183 {
182 target.resourceTreeModel.resumeReload(); 184 if (resourceTreeModel)
185 resourceTreeModel.resumeReload();
183 if (callback) 186 if (callback)
184 callback(error); 187 callback(error);
185 } 188 }
186 }, 189 },
187 190
188 /** 191 /**
189 * @override 192 * @override
190 */ 193 */
191 tracingStarted: function() 194 tracingStarted: function()
192 { 195 {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 281
279 /** 282 /**
280 * @param {number} progress 283 * @param {number} progress
281 * @override 284 * @override
282 */ 285 */
283 eventsRetrievalProgress: function(progress) 286 eventsRetrievalProgress: function(progress)
284 { 287 {
285 this._delegate.loadingProgress(progress); 288 this._delegate.loadingProgress(progress);
286 } 289 }
287 } 290 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698