| 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 * @param {!WebInspector.TracingModel} tracingModel | 6 * @param {!WebInspector.TracingModel} tracingModel |
| 7 * @constructor | 7 * @constructor |
| 8 * @extends {WebInspector.TimelineModel} | 8 * @extends {WebInspector.TimelineModel} |
| 9 */ | 9 */ |
| 10 WebInspector.TracingTimelineModel = function(tracingModel) | 10 WebInspector.TracingTimelineModel = function(tracingModel) |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 598 |
| 599 /** | 599 /** |
| 600 * @return {string} | 600 * @return {string} |
| 601 */ | 601 */ |
| 602 type: function() | 602 type: function() |
| 603 { | 603 { |
| 604 return this._event.name; | 604 return this._event.name; |
| 605 }, | 605 }, |
| 606 | 606 |
| 607 /** | 607 /** |
| 608 * @return {?Object} | |
| 609 */ | |
| 610 counters: function() | |
| 611 { | |
| 612 return this.type() === WebInspector.TracingTimelineModel.RecordType.Upda
teCounters ? this._event.args.data : null; | |
| 613 }, | |
| 614 | |
| 615 /** | |
| 616 * @return {boolean} | |
| 617 */ | |
| 618 isProgram: function() | |
| 619 { | |
| 620 return this.type() === WebInspector.TracingTimelineModel.RecordType.Prog
ram; | |
| 621 }, | |
| 622 | |
| 623 /** | |
| 624 * @return {?Object} | |
| 625 */ | |
| 626 highlightQuad: function() | |
| 627 { | |
| 628 return this._event.highlightQuad || null; | |
| 629 }, | |
| 630 | |
| 631 /** | |
| 632 * @return {string} | 608 * @return {string} |
| 633 */ | 609 */ |
| 634 frameId: function() | 610 frameId: function() |
| 635 { | 611 { |
| 636 switch (this._event.name) { | 612 switch (this._event.name) { |
| 637 case WebInspector.TracingTimelineModel.RecordType.ScheduleStyleRecalcula
tion: | 613 case WebInspector.TracingTimelineModel.RecordType.ScheduleStyleRecalcula
tion: |
| 638 case WebInspector.TracingTimelineModel.RecordType.RecalculateStyles: | 614 case WebInspector.TracingTimelineModel.RecordType.RecalculateStyles: |
| 639 case WebInspector.TracingTimelineModel.RecordType.InvalidateLayout: | 615 case WebInspector.TracingTimelineModel.RecordType.InvalidateLayout: |
| 640 return this._event.args["frameId"]; | 616 return this._event.args["frameId"]; |
| 641 case WebInspector.TracingTimelineModel.RecordType.Layout: | 617 case WebInspector.TracingTimelineModel.RecordType.Layout: |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 */ | 676 */ |
| 701 testContentMatching: function(regExp) | 677 testContentMatching: function(regExp) |
| 702 { | 678 { |
| 703 var tokens = [this.title()]; | 679 var tokens = [this.title()]; |
| 704 var data = this._event.args.data; | 680 var data = this._event.args.data; |
| 705 if (data) { | 681 if (data) { |
| 706 for (var key in data) | 682 for (var key in data) |
| 707 tokens.push(data[key]); | 683 tokens.push(data[key]); |
| 708 } | 684 } |
| 709 return regExp.test(tokens.join("|")); | 685 return regExp.test(tokens.join("|")); |
| 686 }, |
| 687 |
| 688 /** |
| 689 * @return {!WebInspector.TracingModel.Event} |
| 690 */ |
| 691 traceEvent: function() |
| 692 { |
| 693 return this._event; |
| 710 } | 694 } |
| 711 } | 695 } |
| OLD | NEW |