| 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.VBoxWithToolbarItems} | 8 * @extends {WebInspector.View} |
| 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.VBoxWithToolbarItems.call(this); | 14 WebInspector.View.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 335 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.VBoxWithToolbarItems.prototype | 370 __proto__: WebInspector.View.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 |