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

Unified Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 1298543002: DevTools: Support Top-Down tree view on Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
Index: Source/devtools/front_end/timeline/TimelineModel.js
diff --git a/Source/devtools/front_end/timeline/TimelineModel.js b/Source/devtools/front_end/timeline/TimelineModel.js
index 51722814e375deeec817ce15a3a07a02d1a79e47..d2426980a7a5e8b964534e5b278ef4acd5cfdc98 100644
--- a/Source/devtools/front_end/timeline/TimelineModel.js
+++ b/Source/devtools/front_end/timeline/TimelineModel.js
@@ -1555,7 +1555,7 @@ WebInspector.TimelineModel.buildTopDownTree = function(events, startTime, endTim
/**
* @param {!WebInspector.TimelineModel.ProfileTreeNode} topDownTree
- * @param {function(!WebInspector.TimelineModel.ProfileTreeNode):?WebInspector.TimelineModel.ProfileTreeNode=} groupingCallback
+ * @param {?function(!WebInspector.TimelineModel.ProfileTreeNode):!WebInspector.TimelineModel.ProfileTreeNode=} groupingCallback
* @return {!WebInspector.TimelineModel.ProfileTreeNode}
*/
WebInspector.TimelineModel.buildBottomUpTree = function(topDownTree, groupingCallback)
@@ -1836,6 +1836,29 @@ WebInspector.InclusiveTraceEventNameFilter.prototype = {
/**
* @constructor
* @implements {WebInspector.TraceEventFilter}
+ * @param {function(!WebInspector.TracingModel.Event):boolean} filter
+ */
+WebInspector.CustomFilter = function(filter)
+{
+ WebInspector.TraceEventFilter.call(this);
+ this._filter = filter;
+}
+
+WebInspector.CustomFilter.prototype = {
+ /**
+ * @override
+ * @param {!WebInspector.TracingModel.Event} event
+ * @return {boolean}
+ */
+ accept: function(event)
+ {
+ return this._filter(event);
+ }
+}
+
+/**
+ * @constructor
+ * @implements {WebInspector.TraceEventFilter}
*/
WebInspector.ExcludeTopLevelFilter = function()
{

Powered by Google App Engine
This is Rietveld 408576698