Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineModel.js

Issue 336183005: Remove title() from TimelineModel.Record (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 /** 531 /**
532 * @return {!WebInspector.TimelineCategory} 532 * @return {!WebInspector.TimelineCategory}
533 */ 533 */
534 category: function() 534 category: function()
535 { 535 {
536 var style = WebInspector.TracingTimelineUIUtils.styleForTraceEvent(this. _event.name); 536 var style = WebInspector.TracingTimelineUIUtils.styleForTraceEvent(this. _event.name);
537 return style.category; 537 return style.category;
538 }, 538 },
539 539
540 /** 540 /**
541 * @return {string}
542 */
543 title: function()
544 {
545 return WebInspector.TracingTimelineUIUtils.styleForTraceEvent(this._even t.name).title;
546 },
547
548 /**
549 * @return {number} 541 * @return {number}
550 */ 542 */
551 startTime: function() 543 startTime: function()
552 { 544 {
553 return this._event.startTime; 545 return this._event.startTime;
554 }, 546 },
555 547
556 /** 548 /**
557 * @return {string|undefined} 549 * @return {string|undefined}
558 */ 550 */
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 * @return {?Array.<string>} 645 * @return {?Array.<string>}
654 */ 646 */
655 warnings: function() 647 warnings: function()
656 { 648 {
657 if (this._event.warning) 649 if (this._event.warning)
658 return [this._event.warning]; 650 return [this._event.warning];
659 return null; 651 return null;
660 }, 652 },
661 653
662 /** 654 /**
663 * @param {!RegExp} regExp
664 * @return {boolean}
665 */
666 testContentMatching: function(regExp)
667 {
668 var tokens = [this.title()];
669 var data = this._event.args.data;
670 if (data) {
671 for (var key in data)
672 tokens.push(data[key]);
673 }
674 return regExp.test(tokens.join("|"));
675 },
676
677 /**
678 * @return {!WebInspector.TracingModel.Event} 655 * @return {!WebInspector.TracingModel.Event}
679 */ 656 */
680 traceEvent: function() 657 traceEvent: function()
681 { 658 {
682 return this._event; 659 return this._event;
683 } 660 }
684 } 661 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineView.js ('k') | Source/devtools/front_end/timeline/TracingTimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698