| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 * @param {!WebInspector.TimelineModel} model | 8 * @param {!WebInspector.TimelineModel} model |
| 9 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters | 9 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters |
| 10 */ | 10 */ |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 * @return {boolean} | 606 * @return {boolean} |
| 607 */ | 607 */ |
| 608 _showDetailsForNode: function(node) | 608 _showDetailsForNode: function(node) |
| 609 { | 609 { |
| 610 var stack = this._buildHeaviestStack(node); | 610 var stack = this._buildHeaviestStack(node); |
| 611 this._stackView.setStack(stack, node); | 611 this._stackView.setStack(stack, node); |
| 612 this._stackView.show(this._detailsView.element); | 612 this._stackView.show(this._detailsView.element); |
| 613 return true; | 613 return true; |
| 614 }, | 614 }, |
| 615 | 615 |
| 616 /** |
| 617 * @return {!WebInspector.TimelineAggregator} |
| 618 */ |
| 619 _createAggregator: function() |
| 620 { |
| 621 return new WebInspector.TimelineAggregator( |
| 622 event => WebInspector.TimelineUIUtils.eventStyle(event).title, |
| 623 event => WebInspector.TimelineUIUtils.eventStyle(event).category.na
me |
| 624 ); |
| 625 }, |
| 626 |
| 616 __proto__: WebInspector.TimelineTreeView.prototype, | 627 __proto__: WebInspector.TimelineTreeView.prototype, |
| 617 }; | 628 }; |
| 618 | 629 |
| 619 /** | 630 /** |
| 620 * @constructor | 631 * @constructor |
| 621 * @extends {WebInspector.AggregatedTimelineTreeView} | 632 * @extends {WebInspector.AggregatedTimelineTreeView} |
| 622 * @param {!WebInspector.TimelineModel} model | 633 * @param {!WebInspector.TimelineModel} model |
| 623 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters | 634 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters |
| 624 */ | 635 */ |
| 625 WebInspector.CallTreeTimelineTreeView = function(model, filters) | 636 WebInspector.CallTreeTimelineTreeView = function(model, filters) |
| 626 { | 637 { |
| 627 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); | 638 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); |
| 628 this._dataGrid.markColumnAsSortedBy("total", WebInspector.DataGrid.Order.Des
cending); | 639 this._dataGrid.markColumnAsSortedBy("total", WebInspector.DataGrid.Order.Des
cending); |
| 629 } | 640 } |
| 630 | 641 |
| 631 WebInspector.CallTreeTimelineTreeView.prototype = { | 642 WebInspector.CallTreeTimelineTreeView.prototype = { |
| 632 /** | 643 /** |
| 633 * @override | 644 * @override |
| 634 * @return {!WebInspector.TimelineProfileTree.Node} | 645 * @return {!WebInspector.TimelineProfileTree.Node} |
| 635 */ | 646 */ |
| 636 _buildTree: function() | 647 _buildTree: function() |
| 637 { | 648 { |
| 638 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve
ntId); | 649 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve
ntId); |
| 639 var aggregator = new WebInspector.TimelineAggregator(event => WebInspect
or.TimelineUIUtils.eventStyle(event)); | 650 return this._createAggregator().performGrouping(topDown, this._groupBySe
tting.get()); |
| 640 return aggregator.performGrouping(topDown, this._groupBySetting.get()); | |
| 641 }, | 651 }, |
| 642 | 652 |
| 643 __proto__: WebInspector.AggregatedTimelineTreeView.prototype, | 653 __proto__: WebInspector.AggregatedTimelineTreeView.prototype, |
| 644 }; | 654 }; |
| 645 | 655 |
| 646 /** | 656 /** |
| 647 * @constructor | 657 * @constructor |
| 648 * @extends {WebInspector.AggregatedTimelineTreeView} | 658 * @extends {WebInspector.AggregatedTimelineTreeView} |
| 649 * @param {!WebInspector.TimelineModel} model | 659 * @param {!WebInspector.TimelineModel} model |
| 650 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters | 660 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters |
| 651 */ | 661 */ |
| 652 WebInspector.BottomUpTimelineTreeView = function(model, filters) | 662 WebInspector.BottomUpTimelineTreeView = function(model, filters) |
| 653 { | 663 { |
| 654 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); | 664 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); |
| 655 this._dataGrid.markColumnAsSortedBy("self", WebInspector.DataGrid.Order.Desc
ending); | 665 this._dataGrid.markColumnAsSortedBy("self", WebInspector.DataGrid.Order.Desc
ending); |
| 656 } | 666 } |
| 657 | 667 |
| 658 WebInspector.BottomUpTimelineTreeView.prototype = { | 668 WebInspector.BottomUpTimelineTreeView.prototype = { |
| 659 /** | 669 /** |
| 660 * @override | 670 * @override |
| 661 * @return {!WebInspector.TimelineProfileTree.Node} | 671 * @return {!WebInspector.TimelineProfileTree.Node} |
| 662 */ | 672 */ |
| 663 _buildTree: function() | 673 _buildTree: function() |
| 664 { | 674 { |
| 665 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve
ntId); | 675 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve
ntId); |
| 666 var aggregator = new WebInspector.TimelineAggregator(event => WebInspect
or.TimelineUIUtils.eventStyle(event)); | 676 return WebInspector.TimelineProfileTree.buildBottomUp(topDown, this._cre
ateAggregator().groupFunction(this._groupBySetting.get())); |
| 667 return WebInspector.TimelineProfileTree.buildBottomUp(topDown, aggregato
r.groupFunction(this._groupBySetting.get())); | |
| 668 }, | 677 }, |
| 669 | 678 |
| 670 __proto__: WebInspector.AggregatedTimelineTreeView.prototype | 679 __proto__: WebInspector.AggregatedTimelineTreeView.prototype |
| 671 }; | 680 }; |
| 672 | 681 |
| 673 /** | 682 /** |
| 674 * @constructor | 683 * @constructor |
| 675 * @extends {WebInspector.TimelineTreeView} | 684 * @extends {WebInspector.TimelineTreeView} |
| 676 * @param {!WebInspector.TimelineModel} model | 685 * @param {!WebInspector.TimelineModel} model |
| 677 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters | 686 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod
e} */ (selectedNode)._profileNode; | 877 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod
e} */ (selectedNode)._profileNode; |
| 869 }, | 878 }, |
| 870 | 879 |
| 871 _onSelectionChanged: function() | 880 _onSelectionChanged: function() |
| 872 { | 881 { |
| 873 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele
ctionChanged); | 882 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele
ctionChanged); |
| 874 }, | 883 }, |
| 875 | 884 |
| 876 __proto__: WebInspector.VBox.prototype | 885 __proto__: WebInspector.VBox.prototype |
| 877 } | 886 } |
| OLD | NEW |