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

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineModel.js

Issue 397313003: DevTools: Remove target function from TimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.TracingModel} tracingModel 7 * @param {!WebInspector.TracingModel} tracingModel
8 * @param {!WebInspector.TimelineModel.Filter} recordFilter 8 * @param {!WebInspector.TimelineModel.Filter} recordFilter
9 * @extends {WebInspector.TimelineModel} 9 * @extends {WebInspector.TimelineModel}
10 */ 10 */
11 WebInspector.TracingTimelineModel = function(tracingModel, recordFilter) 11 WebInspector.TracingTimelineModel = function(tracingModel, recordFilter)
12 { 12 {
13 WebInspector.TimelineModel.call(this, tracingModel.target()); 13 WebInspector.TimelineModel.call(this);
14 this._tracingModel = tracingModel; 14 this._tracingModel = tracingModel;
15 this._inspectedTargetEvents = []; 15 this._inspectedTargetEvents = [];
16 this._recordFilter = recordFilter; 16 this._recordFilter = recordFilter;
17 17
18 this.reset(); 18 this.reset();
19 } 19 }
20 20
21 WebInspector.TracingTimelineModel.RecordType = { 21 WebInspector.TracingTimelineModel.RecordType = {
22 Program: "Program", 22 Program: "Program",
23 EventDispatch: "EventDispatch", 23 EventDispatch: "EventDispatch",
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 { 610 {
611 var initiator = this._event.initiator; 611 var initiator = this._event.initiator;
612 return initiator ? initiator._timelineRecord : null; 612 return initiator ? initiator._timelineRecord : null;
613 }, 613 },
614 614
615 /** 615 /**
616 * @return {!WebInspector.Target} 616 * @return {!WebInspector.Target}
617 */ 617 */
618 target: function() 618 target: function()
619 { 619 {
620 return this._model.target(); 620 //FIXME: get it from this._event
caseq 2014/07/17 16:36:44 Why not do it now?
sergeyv 2014/07/17 17:07:07 Because thread has nullable target, and Record has
621 return WebInspector.targetManager.targets()[0];
621 }, 622 },
622 623
623 /** 624 /**
624 * @return {number} 625 * @return {number}
625 */ 626 */
626 selfTime: function() 627 selfTime: function()
627 { 628 {
628 return this._event.selfTime; 629 return this._event.selfTime;
629 }, 630 },
630 631
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 }, 762 },
762 763
763 /** 764 /**
764 * @return {!WebInspector.TimelineModel} 765 * @return {!WebInspector.TimelineModel}
765 */ 766 */
766 timelineModel: function() 767 timelineModel: function()
767 { 768 {
768 return this._model; 769 return this._model;
769 } 770 }
770 } 771 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698