OLD | NEW |
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 * @extends {WebInspector.TimelineModel} | 7 * @extends {WebInspector.TimelineModel} |
8 * @param {!WebInspector.TimelineManager} timelineManager | 8 * @param {!WebInspector.TimelineManager} timelineManager |
9 */ | 9 */ |
10 WebInspector.TimelineModelImpl = function(timelineManager) | 10 WebInspector.TimelineModelImpl = function(timelineManager) |
11 { | 11 { |
12 WebInspector.TimelineModel.call(this, timelineManager.target()); | 12 WebInspector.TimelineModel.call(this); |
| 13 this._target = timelineManager.target(); |
13 this._timelineManager = timelineManager; | 14 this._timelineManager = timelineManager; |
14 this._filters = []; | 15 this._filters = []; |
15 this._bindings = new WebInspector.TimelineModelImpl.InterRecordBindings(); | 16 this._bindings = new WebInspector.TimelineModelImpl.InterRecordBindings(); |
16 | 17 |
17 this.reset(); | 18 this.reset(); |
18 | 19 |
19 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineEventRecorded, this._onRecordAdded, this); | 20 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineEventRecorded, this._onRecordAdded, this); |
20 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineStarted, this._onStarted, this); | 21 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineStarted, this._onStarted, this); |
21 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineStopped, this._onStopped, this); | 22 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineStopped, this._onStopped, this); |
22 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineProgress, this._onProgress, this); | 23 this._timelineManager.addEventListener(WebInspector.TimelineManager.EventTyp
es.TimelineProgress, this._onProgress, this); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 initiator: function() | 389 initiator: function() |
389 { | 390 { |
390 return this._initiator; | 391 return this._initiator; |
391 }, | 392 }, |
392 | 393 |
393 /** | 394 /** |
394 * @return {!WebInspector.Target} | 395 * @return {!WebInspector.Target} |
395 */ | 396 */ |
396 target: function() | 397 target: function() |
397 { | 398 { |
398 return this._model.target(); | 399 return this._model._target; |
399 }, | 400 }, |
400 | 401 |
401 /** | 402 /** |
402 * @return {number} | 403 * @return {number} |
403 */ | 404 */ |
404 selfTime: function() | 405 selfTime: function() |
405 { | 406 { |
406 return this._selfTime; | 407 return this._selfTime; |
407 }, | 408 }, |
408 | 409 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 break; | 702 break; |
702 length += itemLength; | 703 length += itemLength; |
703 data.push(item); | 704 data.push(item); |
704 ++this._recordIndex; | 705 ++this._recordIndex; |
705 } | 706 } |
706 if (this._recordIndex === this._payloads.length) | 707 if (this._recordIndex === this._payloads.length) |
707 data.push(data.pop() + "]"); | 708 data.push(data.pop() + "]"); |
708 stream.write(data.join(separator), this._writeNextChunk.bind(this)); | 709 stream.write(data.join(separator), this._writeNextChunk.bind(this)); |
709 } | 710 } |
710 } | 711 } |
OLD | NEW |