| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 this.focusButton.setEnabled(false); | 65 this.focusButton.setEnabled(false); |
| 66 this.focusButton.addEventListener("click", this._focusClicked, this); | 66 this.focusButton.addEventListener("click", this._focusClicked, this); |
| 67 this._statusBarButtonsElement.appendChild(this.focusButton.element); | 67 this._statusBarButtonsElement.appendChild(this.focusButton.element); |
| 68 | 68 |
| 69 this.excludeButton = new WebInspector.StatusBarButton(WebInspector.UIString(
"Exclude selected function."), "exclude-profile-node-status-bar-item"); | 69 this.excludeButton = new WebInspector.StatusBarButton(WebInspector.UIString(
"Exclude selected function."), "exclude-profile-node-status-bar-item"); |
| 70 this.excludeButton.setEnabled(false); | 70 this.excludeButton.setEnabled(false); |
| 71 this.excludeButton.addEventListener("click", this._excludeClicked, this); | 71 this.excludeButton.addEventListener("click", this._excludeClicked, this); |
| 72 this._statusBarButtonsElement.appendChild(this.excludeButton.element); | 72 this._statusBarButtonsElement.appendChild(this.excludeButton.element); |
| 73 | 73 |
| 74 this.resetButton = new WebInspector.StatusBarButton(WebInspector.UIString("R
estore all functions."), "reset-profile-status-bar-item"); | 74 this.resetButton = new WebInspector.StatusBarButton(WebInspector.UIString("R
estore all functions."), "reset-profile-status-bar-item"); |
| 75 this.resetButton.visible = false; | 75 this.resetButton.setVisible(false); |
| 76 this.resetButton.addEventListener("click", this._resetClicked, this); | 76 this.resetButton.addEventListener("click", this._resetClicked, this); |
| 77 this._statusBarButtonsElement.appendChild(this.resetButton.element); | 77 this._statusBarButtonsElement.appendChild(this.resetButton.element); |
| 78 | 78 |
| 79 this._profileHeader = profileHeader; | 79 this._profileHeader = profileHeader; |
| 80 this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.Defa
ultFormatter(30)); | 80 this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.Defa
ultFormatter(30)); |
| 81 | 81 |
| 82 this.profile = new WebInspector.CPUProfileDataModel(profileHeader._profile |
| profileHeader.protocolProfile()); | 82 this.profile = new WebInspector.CPUProfileDataModel(profileHeader._profile |
| profileHeader.protocolProfile()); |
| 83 | 83 |
| 84 this._changeView(); | 84 this._changeView(); |
| 85 if (this._flameChart) | 85 if (this._flameChart) |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 this._statusBarButtonsElement.classList.toggle("hidden", this._viewType.
get() === WebInspector.CPUProfileView._TypeFlame); | 311 this._statusBarButtonsElement.classList.toggle("hidden", this._viewType.
get() === WebInspector.CPUProfileView._TypeFlame); |
| 312 this._visibleView.show(this._searchableView.element); | 312 this._visibleView.show(this._searchableView.element); |
| 313 }, | 313 }, |
| 314 | 314 |
| 315 _focusClicked: function(event) | 315 _focusClicked: function(event) |
| 316 { | 316 { |
| 317 if (!this.dataGrid.selectedNode) | 317 if (!this.dataGrid.selectedNode) |
| 318 return; | 318 return; |
| 319 | 319 |
| 320 this.resetButton.visible = true; | 320 this.resetButton.setVisible(true); |
| 321 this.profileDataGridTree.focus(this.dataGrid.selectedNode); | 321 this.profileDataGridTree.focus(this.dataGrid.selectedNode); |
| 322 this.refresh(); | 322 this.refresh(); |
| 323 this.refreshVisibleData(); | 323 this.refreshVisibleData(); |
| 324 }, | 324 }, |
| 325 | 325 |
| 326 _excludeClicked: function(event) | 326 _excludeClicked: function(event) |
| 327 { | 327 { |
| 328 var selectedNode = this.dataGrid.selectedNode | 328 var selectedNode = this.dataGrid.selectedNode |
| 329 | 329 |
| 330 if (!selectedNode) | 330 if (!selectedNode) |
| 331 return; | 331 return; |
| 332 | 332 |
| 333 selectedNode.deselect(); | 333 selectedNode.deselect(); |
| 334 | 334 |
| 335 this.resetButton.visible = true; | 335 this.resetButton.setVisible(true); |
| 336 this.profileDataGridTree.exclude(selectedNode); | 336 this.profileDataGridTree.exclude(selectedNode); |
| 337 this.refresh(); | 337 this.refresh(); |
| 338 this.refreshVisibleData(); | 338 this.refreshVisibleData(); |
| 339 }, | 339 }, |
| 340 | 340 |
| 341 _resetClicked: function(event) | 341 _resetClicked: function(event) |
| 342 { | 342 { |
| 343 this.resetButton.visible = false; | 343 this.resetButton.setVisible(false); |
| 344 this.profileDataGridTree.restore(); | 344 this.profileDataGridTree.restore(); |
| 345 this._linkifier.reset(); | 345 this._linkifier.reset(); |
| 346 this.refresh(); | 346 this.refresh(); |
| 347 this.refreshVisibleData(); | 347 this.refreshVisibleData(); |
| 348 }, | 348 }, |
| 349 | 349 |
| 350 _dataGridNodeSelected: function(node) | 350 _dataGridNodeSelected: function(node) |
| 351 { | 351 { |
| 352 this.focusButton.setEnabled(true); | 352 this.focusButton.setEnabled(true); |
| 353 this.excludeButton.setEnabled(true); | 353 this.excludeButton.setEnabled(true); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 _notifyTempFileReady: function() | 778 _notifyTempFileReady: function() |
| 779 { | 779 { |
| 780 if (this._onTempFileReady) { | 780 if (this._onTempFileReady) { |
| 781 this._onTempFileReady(); | 781 this._onTempFileReady(); |
| 782 this._onTempFileReady = null; | 782 this._onTempFileReady = null; |
| 783 } | 783 } |
| 784 }, | 784 }, |
| 785 | 785 |
| 786 __proto__: WebInspector.ProfileHeader.prototype | 786 __proto__: WebInspector.ProfileHeader.prototype |
| 787 } | 787 } |
| OLD | NEW |