OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @implements {WebInspector.Searchable} | 7 * @implements {WebInspector.Searchable} |
8 * @extends {WebInspector.VBox} | 8 * @extends {WebInspector.VBoxWithToolbarItems} |
9 * @param {!WebInspector.ProfileDataGridNode.Formatter} nodeFormatter | 9 * @param {!WebInspector.ProfileDataGridNode.Formatter} nodeFormatter |
10 * @param {!Array<string>=} viewTypes | 10 * @param {!Array<string>=} viewTypes |
11 */ | 11 */ |
12 WebInspector.ProfileView = function(nodeFormatter, viewTypes) | 12 WebInspector.ProfileView = function(nodeFormatter, viewTypes) |
13 { | 13 { |
14 WebInspector.VBox.call(this); | 14 WebInspector.VBoxWithToolbarItems.call(this); |
15 | 15 |
16 this._searchableView = new WebInspector.SearchableView(this); | 16 this._searchableView = new WebInspector.SearchableView(this); |
17 this._searchableView.setPlaceholder(WebInspector.UIString("Find by cost (>50
ms), name or file")); | 17 this._searchableView.setPlaceholder(WebInspector.UIString("Find by cost (>50
ms), name or file")); |
18 this._searchableView.show(this.element); | 18 this._searchableView.show(this.element); |
19 | 19 |
20 viewTypes = viewTypes || [ | 20 viewTypes = viewTypes || [ |
21 WebInspector.ProfileView.ViewTypes.Flame, | 21 WebInspector.ProfileView.ViewTypes.Flame, |
22 WebInspector.ProfileView.ViewTypes.Heavy, | 22 WebInspector.ProfileView.ViewTypes.Heavy, |
23 WebInspector.ProfileView.ViewTypes.Tree | 23 WebInspector.ProfileView.ViewTypes.Tree |
24 ]; | 24 ]; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 * @param {number} timeRight | 103 * @param {number} timeRight |
104 */ | 104 */ |
105 selectRange: function(timeLeft, timeRight) | 105 selectRange: function(timeLeft, timeRight) |
106 { | 106 { |
107 if (!this._flameChart) | 107 if (!this._flameChart) |
108 return; | 108 return; |
109 this._flameChart.selectRange(timeLeft, timeRight); | 109 this._flameChart.selectRange(timeLeft, timeRight); |
110 }, | 110 }, |
111 | 111 |
112 /** | 112 /** |
| 113 * @override |
113 * @return {!Array.<!WebInspector.ToolbarItem>} | 114 * @return {!Array.<!WebInspector.ToolbarItem>} |
114 */ | 115 */ |
115 toolbarItems: function() | 116 toolbarItems: function() |
116 { | 117 { |
117 return [this.viewSelectComboBox, this.focusButton, this.excludeButton, t
his.resetButton]; | 118 return [this.viewSelectComboBox, this.focusButton, this.excludeButton, t
his.resetButton]; |
118 }, | 119 }, |
119 | 120 |
120 /** | 121 /** |
121 * @return {!WebInspector.ProfileDataGridTree} | 122 * @return {!WebInspector.ProfileDataGridTree} |
122 */ | 123 */ |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 _sortProfile: function() | 360 _sortProfile: function() |
360 { | 361 { |
361 var sortAscending = this.dataGrid.isSortOrderAscending(); | 362 var sortAscending = this.dataGrid.isSortOrderAscending(); |
362 var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier(); | 363 var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier(); |
363 var sortProperty = sortColumnIdentifier === "function" ? "functionName"
: sortColumnIdentifier || ""; | 364 var sortProperty = sortColumnIdentifier === "function" ? "functionName"
: sortColumnIdentifier || ""; |
364 this.profileDataGridTree.sort(WebInspector.ProfileDataGridTree.propertyC
omparator(sortProperty, sortAscending)); | 365 this.profileDataGridTree.sort(WebInspector.ProfileDataGridTree.propertyC
omparator(sortProperty, sortAscending)); |
365 | 366 |
366 this.refresh(); | 367 this.refresh(); |
367 }, | 368 }, |
368 | 369 |
369 __proto__: WebInspector.VBox.prototype | 370 __proto__: WebInspector.VBoxWithToolbarItems.prototype |
370 } | 371 } |
371 | 372 |
372 /** | 373 /** |
373 * @constructor | 374 * @constructor |
374 * @extends {WebInspector.ProfileHeader} | 375 * @extends {WebInspector.ProfileHeader} |
375 * @implements {WebInspector.OutputStream} | 376 * @implements {WebInspector.OutputStream} |
376 * @implements {WebInspector.OutputStreamDelegate} | 377 * @implements {WebInspector.OutputStreamDelegate} |
377 * @param {?WebInspector.Target} target | 378 * @param {?WebInspector.Target} target |
378 * @param {!WebInspector.ProfileType} type | 379 * @param {!WebInspector.ProfileType} type |
379 * @param {string=} title | 380 * @param {string=} title |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 _notifyTempFileReady: function() | 584 _notifyTempFileReady: function() |
584 { | 585 { |
585 if (this._onTempFileReady) { | 586 if (this._onTempFileReady) { |
586 this._onTempFileReady(); | 587 this._onTempFileReady(); |
587 this._onTempFileReady = null; | 588 this._onTempFileReady = null; |
588 } | 589 } |
589 }, | 590 }, |
590 | 591 |
591 __proto__: WebInspector.ProfileHeader.prototype | 592 __proto__: WebInspector.ProfileHeader.prototype |
592 } | 593 } |
OLD | NEW |