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 _createAggregator: function() | |
alph
2016/06/17 12:08:07
Annotate plz
| |
617 { | |
618 return new WebInspector.TimelineAggregator( | |
619 event => WebInspector.TimelineUIUtils.eventStyle(event).title, | |
620 event => WebInspector.TimelineUIUtils.eventStyle(event).category.na me | |
621 ); | |
622 }, | |
623 | |
616 __proto__: WebInspector.TimelineTreeView.prototype, | 624 __proto__: WebInspector.TimelineTreeView.prototype, |
617 }; | 625 }; |
618 | 626 |
619 /** | 627 /** |
620 * @constructor | 628 * @constructor |
621 * @extends {WebInspector.AggregatedTimelineTreeView} | 629 * @extends {WebInspector.AggregatedTimelineTreeView} |
622 * @param {!WebInspector.TimelineModel} model | 630 * @param {!WebInspector.TimelineModel} model |
623 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters | 631 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters |
624 */ | 632 */ |
625 WebInspector.CallTreeTimelineTreeView = function(model, filters) | 633 WebInspector.CallTreeTimelineTreeView = function(model, filters) |
626 { | 634 { |
627 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); | 635 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); |
628 this._dataGrid.markColumnAsSortedBy("total", WebInspector.DataGrid.Order.Des cending); | 636 this._dataGrid.markColumnAsSortedBy("total", WebInspector.DataGrid.Order.Des cending); |
629 } | 637 } |
630 | 638 |
631 WebInspector.CallTreeTimelineTreeView.prototype = { | 639 WebInspector.CallTreeTimelineTreeView.prototype = { |
632 /** | 640 /** |
633 * @override | 641 * @override |
634 * @return {!WebInspector.TimelineProfileTree.Node} | 642 * @return {!WebInspector.TimelineProfileTree.Node} |
635 */ | 643 */ |
636 _buildTree: function() | 644 _buildTree: function() |
637 { | 645 { |
638 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve ntId); | 646 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve ntId); |
639 var aggregator = new WebInspector.TimelineAggregator(event => WebInspect or.TimelineUIUtils.eventStyle(event)); | 647 return this._createAggregator().performGrouping(topDown, this._groupBySe tting.get()); |
640 return aggregator.performGrouping(topDown, this._groupBySetting.get()); | |
641 }, | 648 }, |
642 | 649 |
643 __proto__: WebInspector.AggregatedTimelineTreeView.prototype, | 650 __proto__: WebInspector.AggregatedTimelineTreeView.prototype, |
644 }; | 651 }; |
645 | 652 |
646 /** | 653 /** |
647 * @constructor | 654 * @constructor |
648 * @extends {WebInspector.AggregatedTimelineTreeView} | 655 * @extends {WebInspector.AggregatedTimelineTreeView} |
649 * @param {!WebInspector.TimelineModel} model | 656 * @param {!WebInspector.TimelineModel} model |
650 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters | 657 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters |
651 */ | 658 */ |
652 WebInspector.BottomUpTimelineTreeView = function(model, filters) | 659 WebInspector.BottomUpTimelineTreeView = function(model, filters) |
653 { | 660 { |
654 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); | 661 WebInspector.AggregatedTimelineTreeView.call(this, model, filters); |
655 this._dataGrid.markColumnAsSortedBy("self", WebInspector.DataGrid.Order.Desc ending); | 662 this._dataGrid.markColumnAsSortedBy("self", WebInspector.DataGrid.Order.Desc ending); |
656 } | 663 } |
657 | 664 |
658 WebInspector.BottomUpTimelineTreeView.prototype = { | 665 WebInspector.BottomUpTimelineTreeView.prototype = { |
659 /** | 666 /** |
660 * @override | 667 * @override |
661 * @return {!WebInspector.TimelineProfileTree.Node} | 668 * @return {!WebInspector.TimelineProfileTree.Node} |
662 */ | 669 */ |
663 _buildTree: function() | 670 _buildTree: function() |
664 { | 671 { |
665 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve ntId); | 672 var topDown = this._buildTopDownTree(WebInspector.TimelineAggregator.eve ntId); |
666 var aggregator = new WebInspector.TimelineAggregator(event => WebInspect or.TimelineUIUtils.eventStyle(event)); | 673 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 }, | 674 }, |
669 | 675 |
670 __proto__: WebInspector.AggregatedTimelineTreeView.prototype | 676 __proto__: WebInspector.AggregatedTimelineTreeView.prototype |
671 }; | 677 }; |
672 | 678 |
673 /** | 679 /** |
674 * @constructor | 680 * @constructor |
675 * @extends {WebInspector.TimelineTreeView} | 681 * @extends {WebInspector.TimelineTreeView} |
676 * @param {!WebInspector.TimelineModel} model | 682 * @param {!WebInspector.TimelineModel} model |
677 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters | 683 * @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; | 874 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode; |
869 }, | 875 }, |
870 | 876 |
871 _onSelectionChanged: function() | 877 _onSelectionChanged: function() |
872 { | 878 { |
873 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged); | 879 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged); |
874 }, | 880 }, |
875 | 881 |
876 __proto__: WebInspector.VBox.prototype | 882 __proto__: WebInspector.VBox.prototype |
877 } | 883 } |
OLD | NEW |