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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/timeline/TracingTimelineModel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TracingTimelineUIUtils.js
diff --git a/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js b/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js
index 50cf0d35039c83db4dcd323798233cdd0df5d118..56244d1683be379d366b49f4473a1fdf50803844 100644
--- a/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js
@@ -68,6 +68,15 @@ WebInspector.TracingTimelineUIUtils.prototype = {
/**
* @param {!WebInspector.TimelineModel.Record} record
+ * @return {string}
+ */
+ titleForRecord: function(record)
+ {
+ return WebInspector.TracingTimelineUIUtils.styleForTraceEvent(record.traceEvent().name).title;
+ },
+
+ /**
+ * @param {!WebInspector.TimelineModel.Record} record
* @param {!WebInspector.Linkifier} linkifier
* @param {boolean} loadedFromFile
* @return {?Node}
@@ -102,6 +111,24 @@ WebInspector.TracingTimelineUIUtils.prototype = {
return WebInspector.TracingTimelineUIUtils._createEventDivider(recordType, title);
},
+ /**
+ * @param {!WebInspector.TimelineModel.Record} record
+ * @param {!RegExp} regExp
+ * @return {boolean}
+ */
+ testContentMatching: function(record, regExp)
+ {
+ var traceEvent = record.traceEvent();
+ var title = WebInspector.TracingTimelineUIUtils.styleForTraceEvent(traceEvent.name).title;
+ var tokens = [title];
+ for (var argName in traceEvent.args) {
+ var argValue = traceEvent.args[argName];
+ for (var key in argValue)
+ tokens.push(argValue[key]);
+ }
+ return regExp.test(tokens.join("|"));
+ },
+
__proto__: WebInspector.TimelineUIUtils.prototype
}
« 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