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) |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 481 |
482 /** | 482 /** |
483 * @return {?Object} | 483 * @return {?Object} |
484 */ | 484 */ |
485 counters: function() | 485 counters: function() |
486 { | 486 { |
487 return this.type() === WebInspector.TimelineModel.RecordType.UpdateCount
ers ? this.data() : null; | 487 return this.type() === WebInspector.TimelineModel.RecordType.UpdateCount
ers ? this.data() : null; |
488 }, | 488 }, |
489 | 489 |
490 /** | 490 /** |
| 491 * @return {boolean} |
| 492 */ |
| 493 isProgram: function() |
| 494 { |
| 495 return this.type() === WebInspector.TimelineModel.RecordType.Program; |
| 496 }, |
| 497 |
| 498 /** |
491 * @return {?Object} | 499 * @return {?Object} |
492 */ | 500 */ |
493 highlightQuad: function() | 501 highlightQuad: function() |
494 { | 502 { |
495 var quad = null; | 503 var quad = null; |
496 var recordTypes = WebInspector.TimelineModel.RecordType; | 504 var recordTypes = WebInspector.TimelineModel.RecordType; |
497 switch(this.type()) { | 505 switch(this.type()) { |
498 case recordTypes.Layout: | 506 case recordTypes.Layout: |
499 quad = this.data().root; | 507 quad = this.data().root; |
500 break; | 508 break; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 break; | 786 break; |
779 length += itemLength; | 787 length += itemLength; |
780 data.push(item); | 788 data.push(item); |
781 ++this._recordIndex; | 789 ++this._recordIndex; |
782 } | 790 } |
783 if (this._recordIndex === this._payloads.length) | 791 if (this._recordIndex === this._payloads.length) |
784 data.push(data.pop() + "]"); | 792 data.push(data.pop() + "]"); |
785 stream.write(data.join(separator), this._writeNextChunk.bind(this)); | 793 stream.write(data.join(separator), this._writeNextChunk.bind(this)); |
786 } | 794 } |
787 } | 795 } |
OLD | NEW |