| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 /** | 474 /** |
| 475 * @return {string} | 475 * @return {string} |
| 476 */ | 476 */ |
| 477 type: function() | 477 type: function() |
| 478 { | 478 { |
| 479 return this._record.type; | 479 return this._record.type; |
| 480 }, | 480 }, |
| 481 | 481 |
| 482 /** | 482 /** |
| 483 * @return {?Object} | |
| 484 */ | |
| 485 counters: function() | |
| 486 { | |
| 487 return this.type() === WebInspector.TimelineModel.RecordType.UpdateCount
ers ? this.data() : null; | |
| 488 }, | |
| 489 | |
| 490 /** | |
| 491 * @return {boolean} | |
| 492 */ | |
| 493 isProgram: function() | |
| 494 { | |
| 495 return this.type() === WebInspector.TimelineModel.RecordType.Program; | |
| 496 }, | |
| 497 | |
| 498 /** | |
| 499 * @return {?Object} | |
| 500 */ | |
| 501 highlightQuad: function() | |
| 502 { | |
| 503 var quad = null; | |
| 504 var recordTypes = WebInspector.TimelineModel.RecordType; | |
| 505 switch(this.type()) { | |
| 506 case recordTypes.Layout: | |
| 507 quad = this.data().root; | |
| 508 break; | |
| 509 case recordTypes.Paint: | |
| 510 quad = this.data().clip; | |
| 511 break; | |
| 512 default: | |
| 513 break; | |
| 514 } | |
| 515 return quad; | |
| 516 }, | |
| 517 | |
| 518 /** | |
| 519 * @return {string} | 483 * @return {string} |
| 520 */ | 484 */ |
| 521 frameId: function() | 485 frameId: function() |
| 522 { | 486 { |
| 523 return this._record.frameId || ""; | 487 return this._record.frameId || ""; |
| 524 }, | 488 }, |
| 525 | 489 |
| 526 /** | 490 /** |
| 527 * @return {?Array.<!ConsoleAgent.CallFrame>} | 491 * @return {?Array.<!ConsoleAgent.CallFrame>} |
| 528 */ | 492 */ |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 break; | 750 break; |
| 787 length += itemLength; | 751 length += itemLength; |
| 788 data.push(item); | 752 data.push(item); |
| 789 ++this._recordIndex; | 753 ++this._recordIndex; |
| 790 } | 754 } |
| 791 if (this._recordIndex === this._payloads.length) | 755 if (this._recordIndex === this._payloads.length) |
| 792 data.push(data.pop() + "]"); | 756 data.push(data.pop() + "]"); |
| 793 stream.write(data.join(separator), this._writeNextChunk.bind(this)); | 757 stream.write(data.join(separator), this._writeNextChunk.bind(this)); |
| 794 } | 758 } |
| 795 } | 759 } |
| OLD | NEW |