Chromium Code Reviews| 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 97cd60855f1617967340225a12a450ae4a699bce..be8cca10e046875ecf619b7edecb61cfe070bdbc 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,11 @@ WebInspector.TimelineProfileTree.eventStackFrame = function(event) |
| /** |
| * @constructor |
| - * @param {function(!WebInspector.TracingModel.Event):string} categoryMapper |
| + * @param {function(!WebInspector.TracingModel.Event):{title: string, category: !WebInspector.TimelineCategory}} eventStyleMapper |
|
caseq
2016/06/15 10:04:23
You can't do this -- category is a UI level notion
|
| */ |
| -WebInspector.TimelineAggregator = function(categoryMapper) |
| +WebInspector.TimelineAggregator = function(eventStyleMapper) |
| { |
| - this._categoryMapper = categoryMapper; |
| + this._eventStyleMapper = eventStyleMapper; |
| /** @type {!Map<string, !WebInspector.TimelineProfileTree.Node>} */ |
| this._groupNodes = new Map(); |
| } |
| @@ -232,6 +232,7 @@ WebInspector.TimelineAggregator = function(categoryMapper) |
| */ |
| WebInspector.TimelineAggregator.GroupBy = { |
| None: "None", |
| + EventName: "EventName", |
| Category: "Category", |
| Domain: "Domain", |
| Subdomain: "Subdomain", |
| @@ -336,7 +337,8 @@ WebInspector.TimelineAggregator.prototype = { |
| switch (groupBy) { |
| case WebInspector.TimelineAggregator.GroupBy.None: return null; |
| - case WebInspector.TimelineAggregator.GroupBy.Category: return node => node.event ? this._categoryMapper(node.event) : ""; |
| + 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.Subdomain: return groupByDomain.bind(null, false); |
| case WebInspector.TimelineAggregator.GroupBy.Domain: return groupByDomain.bind(null, true); |
| case WebInspector.TimelineAggregator.GroupBy.URL: return groupByURL; |