| 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.View} | 8 * @extends {WebInspector.SimpleView} |
| 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.View.call(this, WebInspector.UIString("Profile")); | 14 WebInspector.SimpleView.call(this, WebInspector.UIString("Profile")); |
| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 * @override |
| 114 * @return {!Array.<!WebInspector.ToolbarItem>} | 114 * @return {!Array.<!WebInspector.ToolbarItem>} |
| 115 */ | 115 */ |
| 116 toolbarItems: function() | 116 syncToolbarItems: function() |
| 117 { | 117 { |
| 118 return [this.viewSelectComboBox, this.focusButton, this.excludeButton, t
his.resetButton]; | 118 return [this.viewSelectComboBox, this.focusButton, this.excludeButton, t
his.resetButton]; |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 /** | 121 /** |
| 122 * @return {!WebInspector.ProfileDataGridTree} | 122 * @return {!WebInspector.ProfileDataGridTree} |
| 123 */ | 123 */ |
| 124 _getBottomUpProfileDataGridTree: function() | 124 _getBottomUpProfileDataGridTree: function() |
| 125 { | 125 { |
| 126 if (!this._bottomUpProfileDataGridTree) | 126 if (!this._bottomUpProfileDataGridTree) |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 _sortProfile: function() | 360 _sortProfile: function() |
| 361 { | 361 { |
| 362 var sortAscending = this.dataGrid.isSortOrderAscending(); | 362 var sortAscending = this.dataGrid.isSortOrderAscending(); |
| 363 var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier(); | 363 var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier(); |
| 364 var sortProperty = sortColumnIdentifier === "function" ? "functionName"
: sortColumnIdentifier || ""; | 364 var sortProperty = sortColumnIdentifier === "function" ? "functionName"
: sortColumnIdentifier || ""; |
| 365 this.profileDataGridTree.sort(WebInspector.ProfileDataGridTree.propertyC
omparator(sortProperty, sortAscending)); | 365 this.profileDataGridTree.sort(WebInspector.ProfileDataGridTree.propertyC
omparator(sortProperty, sortAscending)); |
| 366 | 366 |
| 367 this.refresh(); | 367 this.refresh(); |
| 368 }, | 368 }, |
| 369 | 369 |
| 370 __proto__: WebInspector.View.prototype | 370 __proto__: WebInspector.SimpleView.prototype |
| 371 } | 371 } |
| 372 | 372 |
| 373 /** | 373 /** |
| 374 * @constructor | 374 * @constructor |
| 375 * @extends {WebInspector.ProfileHeader} | 375 * @extends {WebInspector.ProfileHeader} |
| 376 * @implements {WebInspector.OutputStream} | 376 * @implements {WebInspector.OutputStream} |
| 377 * @implements {WebInspector.OutputStreamDelegate} | 377 * @implements {WebInspector.OutputStreamDelegate} |
| 378 * @param {?WebInspector.Target} target | 378 * @param {?WebInspector.Target} target |
| 379 * @param {!WebInspector.ProfileType} type | 379 * @param {!WebInspector.ProfileType} type |
| 380 * @param {string=} title | 380 * @param {string=} title |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 _notifyTempFileReady: function() | 584 _notifyTempFileReady: function() |
| 585 { | 585 { |
| 586 if (this._onTempFileReady) { | 586 if (this._onTempFileReady) { |
| 587 this._onTempFileReady(); | 587 this._onTempFileReady(); |
| 588 this._onTempFileReady = null; | 588 this._onTempFileReady = null; |
| 589 } | 589 } |
| 590 }, | 590 }, |
| 591 | 591 |
| 592 __proto__: WebInspector.ProfileHeader.prototype | 592 __proto__: WebInspector.ProfileHeader.prototype |
| 593 } | 593 } |
| OLD | NEW |