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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js

Issue 2072173003: DevTools: fix front-end compilation problems after #399131 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 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 | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
index be8cca10e046875ecf619b7edecb61cfe070bdbc..5ff5f37bae8967f6acd1bdec7dc24b88304bb36b 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
@@ -218,11 +218,13 @@ WebInspector.TimelineProfileTree.eventStackFrame = function(event)
/**
* @constructor
- * @param {function(!WebInspector.TracingModel.Event):{title: string, category: !WebInspector.TimelineCategory}} eventStyleMapper
+ * @param {function(!WebInspector.TracingModel.Event):string} titleMapper
+ * @param {function(!WebInspector.TracingModel.Event):string} categoryMapper
*/
-WebInspector.TimelineAggregator = function(eventStyleMapper)
+WebInspector.TimelineAggregator = function(titleMapper, categoryMapper)
{
- this._eventStyleMapper = eventStyleMapper;
+ this._titleMapper = titleMapper;
+ this._categoryMapper = categoryMapper;
/** @type {!Map<string, !WebInspector.TimelineProfileTree.Node>} */
this._groupNodes = new Map();
}
@@ -337,8 +339,8 @@ WebInspector.TimelineAggregator.prototype = {
switch (groupBy) {
case WebInspector.TimelineAggregator.GroupBy.None: return null;
- case WebInspector.TimelineAggregator.GroupBy.EventName: return node => node.event ? this._eventStyleMapper(node.event).title : "";
- case WebInspector.TimelineAggregator.GroupBy.Category: return node => node.event ? this._eventStyleMapper(node.event).category.name : "";
+ case WebInspector.TimelineAggregator.GroupBy.EventName: return node => node.event ? this._titleMapper(node.event) : "";
+ case WebInspector.TimelineAggregator.GroupBy.Category: return node => node.event ? this._categoryMapper(node.event) : "";
case WebInspector.TimelineAggregator.GroupBy.Subdomain: return groupByDomain.bind(null, false);
case WebInspector.TimelineAggregator.GroupBy.Domain: return groupByDomain.bind(null, true);
case WebInspector.TimelineAggregator.GroupBy.URL: return groupByURL;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698