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

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: Comments Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698