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

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

Issue 2442083002: [DevTools] Merge Worker domain to Target, migrate clients. (Closed)
Patch Set: rebased all tests Created 4 years, 1 month 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (!mainMetaEvent) 260 if (!mainMetaEvent)
261 return; 261 return;
262 262
263 var pid = mainMetaEvent.thread.process().id(); 263 var pid = mainMetaEvent.thread.process().id();
264 var mainCpuProfile = this._cpuProfiles.get(this._target.id()); 264 var mainCpuProfile = this._cpuProfiles.get(this._target.id());
265 this._injectCpuProfileEvent(pid, mainMetaEvent.thread.id(), mainCpuProfi le); 265 this._injectCpuProfileEvent(pid, mainMetaEvent.thread.id(), mainCpuProfi le);
266 266
267 var workerMetaEvents = metadataEvents.filter(event => event.name === met adataEventTypes.TracingSessionIdForWorker); 267 var workerMetaEvents = metadataEvents.filter(event => event.name === met adataEventTypes.TracingSessionIdForWorker);
268 for (var metaEvent of workerMetaEvents) { 268 for (var metaEvent of workerMetaEvents) {
269 var workerId = metaEvent.args["data"]["workerId"]; 269 var workerId = metaEvent.args["data"]["workerId"];
270 var workerTarget = this._target.workerManager ? this._target.workerM anager.targetByWorkerId(workerId) : null; 270 var workerTarget = this._target.subTargetsManager ? this._target.sub TargetsManager.targetForId(workerId) : null;
271 if (!workerTarget) 271 if (!workerTarget)
272 continue; 272 continue;
273 var cpuProfile = this._cpuProfiles.get(workerTarget.id()); 273 var cpuProfile = this._cpuProfiles.get(workerTarget.id());
274 this._injectCpuProfileEvent(pid, metaEvent.args["data"]["workerThrea dId"], cpuProfile); 274 this._injectCpuProfileEvent(pid, metaEvent.args["data"]["workerThrea dId"], cpuProfile);
275 } 275 }
276 this._cpuProfiles = null; 276 this._cpuProfiles = null;
277 }, 277 },
278 278
279 /** 279 /**
280 * @param {number} usage 280 * @param {number} usage
281 * @override 281 * @override
282 */ 282 */
283 tracingBufferUsage: function(usage) 283 tracingBufferUsage: function(usage)
284 { 284 {
285 this._delegate.recordingProgress(usage); 285 this._delegate.recordingProgress(usage);
286 }, 286 },
287 287
288 /** 288 /**
289 * @param {number} progress 289 * @param {number} progress
290 * @override 290 * @override
291 */ 291 */
292 eventsRetrievalProgress: function(progress) 292 eventsRetrievalProgress: function(progress)
293 { 293 {
294 this._delegate.loadingProgress(progress); 294 this._delegate.loadingProgress(progress);
295 } 295 }
296 }; 296 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698