| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 472 |
| 473 /** | 473 /** |
| 474 * @return {string} | 474 * @return {string} |
| 475 */ | 475 */ |
| 476 type: function() | 476 type: function() |
| 477 { | 477 { |
| 478 return this._record.type; | 478 return this._record.type; |
| 479 }, | 479 }, |
| 480 | 480 |
| 481 /** | 481 /** |
| 482 * @return {?Object} |
| 483 */ |
| 484 highlightQuad: function() |
| 485 { |
| 486 var quad = null; |
| 487 var recordTypes = WebInspector.TimelineModel.RecordType; |
| 488 switch(this.type()) { |
| 489 case recordTypes.Layout: |
| 490 quad = this.data().root; |
| 491 break; |
| 492 case recordTypes.Paint: |
| 493 quad = this.data().clip; |
| 494 break; |
| 495 default: |
| 496 break; |
| 497 } |
| 498 return quad; |
| 499 }, |
| 500 |
| 501 /** |
| 482 * @return {string} | 502 * @return {string} |
| 483 */ | 503 */ |
| 484 frameId: function() | 504 frameId: function() |
| 485 { | 505 { |
| 486 return this._record.frameId || ""; | 506 return this._record.frameId || ""; |
| 487 }, | 507 }, |
| 488 | 508 |
| 489 /** | 509 /** |
| 490 * @return {?Array.<!ConsoleAgent.CallFrame>} | 510 * @return {?Array.<!ConsoleAgent.CallFrame>} |
| 491 */ | 511 */ |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 break; | 769 break; |
| 750 length += itemLength; | 770 length += itemLength; |
| 751 data.push(item); | 771 data.push(item); |
| 752 ++this._recordIndex; | 772 ++this._recordIndex; |
| 753 } | 773 } |
| 754 if (this._recordIndex === this._payloads.length) | 774 if (this._recordIndex === this._payloads.length) |
| 755 data.push(data.pop() + "]"); | 775 data.push(data.pop() + "]"); |
| 756 stream.write(data.join(separator), this._writeNextChunk.bind(this)); | 776 stream.write(data.join(separator), this._writeNextChunk.bind(this)); |
| 757 } | 777 } |
| 758 } | 778 } |
| OLD | NEW |