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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 /** 475 /**
476 * @param {!WebInspector.TracingModel.Event} event 476 * @param {!WebInspector.TracingModel.Event} event
477 * @return {?WebInspector.Target} 477 * @return {?WebInspector.Target}
478 */ 478 */
479 targetByEvent: function(event) 479 targetByEvent: function(event)
480 { 480 {
481 // FIXME: Consider returning null for loaded traces. 481 // FIXME: Consider returning null for loaded traces.
482 var workerId = this._workerIdByThread.get(event.thread); 482 var workerId = this._workerIdByThread.get(event.thread);
483 var mainTarget = WebInspector.targetManager.mainTarget(); 483 var mainTarget = WebInspector.targetManager.mainTarget();
484 return workerId ? mainTarget.workerManager.targetByWorkerId(workerId) : mainTarget; 484 return workerId ? mainTarget.subTargetsManager.targetForId(workerId) : m ainTarget;
485 }, 485 },
486 486
487 /** 487 /**
488 * @param {!WebInspector.TracingModel} tracingModel 488 * @param {!WebInspector.TracingModel} tracingModel
489 * @param {boolean=} produceTraceStartedInPage 489 * @param {boolean=} produceTraceStartedInPage
490 */ 490 */
491 setEvents: function(tracingModel, produceTraceStartedInPage) 491 setEvents: function(tracingModel, produceTraceStartedInPage)
492 { 492 {
493 this.reset(); 493 this.reset();
494 this._resetProcessingState(); 494 this._resetProcessingState();
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 if (!id) 1853 if (!id)
1854 return; 1854 return;
1855 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ 1855 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */
1856 var initiatorMap = this._initiatorByType.get(initiatorType); 1856 var initiatorMap = this._initiatorByType.get(initiatorType);
1857 if (isInitiator) 1857 if (isInitiator)
1858 initiatorMap.set(id, event); 1858 initiatorMap.set(id, event);
1859 else 1859 else
1860 event.initiator = initiatorMap.get(id) || null; 1860 event.initiator = initiatorMap.get(id) || null;
1861 } 1861 }
1862 }; 1862 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698