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

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineUIUtils.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
« no previous file with comments | « Source/devtools/front_end/timeline/TracingTimelineModel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * @constructor 6 * @constructor
7 * @extends {WebInspector.TimelineUIUtils} 7 * @extends {WebInspector.TimelineUIUtils}
8 */ 8 */
9 WebInspector.TracingTimelineUIUtils = function() 9 WebInspector.TracingTimelineUIUtils = function()
10 { 10 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 * @param {!WebInspector.TimelineModel.Record} record 61 * @param {!WebInspector.TimelineModel.Record} record
62 * @return {?Object} 62 * @return {?Object}
63 */ 63 */
64 highlightQuadForRecord: function(record) 64 highlightQuadForRecord: function(record)
65 { 65 {
66 return record.traceEvent().highlightQuad || null; 66 return record.traceEvent().highlightQuad || null;
67 }, 67 },
68 68
69 /** 69 /**
70 * @param {!WebInspector.TimelineModel.Record} record 70 * @param {!WebInspector.TimelineModel.Record} record
71 * @return {string}
72 */
73 titleForRecord: function(record)
74 {
75 return WebInspector.TracingTimelineUIUtils.styleForTraceEvent(record.tra ceEvent().name).title;
76 },
77
78 /**
79 * @param {!WebInspector.TimelineModel.Record} record
71 * @param {!WebInspector.Linkifier} linkifier 80 * @param {!WebInspector.Linkifier} linkifier
72 * @param {boolean} loadedFromFile 81 * @param {boolean} loadedFromFile
73 * @return {?Node} 82 * @return {?Node}
74 */ 83 */
75 buildDetailsNode: function(record, linkifier, loadedFromFile) 84 buildDetailsNode: function(record, linkifier, loadedFromFile)
76 { 85 {
77 return WebInspector.TracingTimelineUIUtils.buildDetailsNodeForTraceEvent (record.traceEvent(), linkifier, loadedFromFile, record.target()); 86 return WebInspector.TracingTimelineUIUtils.buildDetailsNodeForTraceEvent (record.traceEvent(), linkifier, loadedFromFile, record.target());
78 }, 87 },
79 88
80 /** 89 /**
(...skipping 14 matching lines...) Expand all
95 /** 104 /**
96 * @param {string} recordType 105 * @param {string} recordType
97 * @param {string=} title 106 * @param {string=} title
98 * @return {!Element} 107 * @return {!Element}
99 */ 108 */
100 createEventDivider: function(recordType, title) 109 createEventDivider: function(recordType, title)
101 { 110 {
102 return WebInspector.TracingTimelineUIUtils._createEventDivider(recordTyp e, title); 111 return WebInspector.TracingTimelineUIUtils._createEventDivider(recordTyp e, title);
103 }, 112 },
104 113
114 /**
115 * @param {!WebInspector.TimelineModel.Record} record
116 * @param {!RegExp} regExp
117 * @return {boolean}
118 */
119 testContentMatching: function(record, regExp)
120 {
121 var traceEvent = record.traceEvent();
122 var title = WebInspector.TracingTimelineUIUtils.styleForTraceEvent(trace Event.name).title;
123 var tokens = [title];
124 for (var argName in traceEvent.args) {
125 var argValue = traceEvent.args[argName];
126 for (var key in argValue)
127 tokens.push(argValue[key]);
128 }
129 return regExp.test(tokens.join("|"));
130 },
131
105 __proto__: WebInspector.TimelineUIUtils.prototype 132 __proto__: WebInspector.TimelineUIUtils.prototype
106 } 133 }
107 134
108 /** 135 /**
109 * @constructor 136 * @constructor
110 * @param {string} title 137 * @param {string} title
111 * @param {!WebInspector.TimelineCategory} category 138 * @param {!WebInspector.TimelineCategory} category
112 */ 139 */
113 WebInspector.TimelineRecordStyle = function(title, category) 140 WebInspector.TimelineRecordStyle = function(title, category)
114 { 141 {
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 else if (recordType === recordTypes.TimeStamp) 712 else if (recordType === recordTypes.TimeStamp)
686 eventDivider.className += " resources-orange-divider"; 713 eventDivider.className += " resources-orange-divider";
687 else if (recordType === recordTypes.BeginFrame) 714 else if (recordType === recordTypes.BeginFrame)
688 eventDivider.className += " timeline-frame-divider"; 715 eventDivider.className += " timeline-frame-divider";
689 716
690 if (title) 717 if (title)
691 eventDivider.title = title; 718 eventDivider.title = title;
692 719
693 return eventDivider; 720 return eventDivider;
694 } 721 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TracingTimelineModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698