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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 this._updateRecordButton(this.recordButton.toggled); | 649 this._updateRecordButton(this.recordButton.toggled); |
650 }, | 650 }, |
651 | 651 |
652 /** | 652 /** |
653 * @param {boolean} toggled | 653 * @param {boolean} toggled |
654 */ | 654 */ |
655 _updateRecordButton: function(toggled) | 655 _updateRecordButton: function(toggled) |
656 { | 656 { |
657 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled(
)) | 657 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled(
)) |
658 WebInspector.inspectorView.setCurrentPanelLocked(toggled); | 658 WebInspector.inspectorView.setCurrentPanelLocked(toggled); |
659 var isAcquiredInSomeTarget = false; | 659 var isAcquiredInSomeTarget = WebInspector.targetManager.targets().some(f
unction(target) { return target.profilingLock.isAcquired(); }); |
660 var targets = WebInspector.targetManager.targets(); | |
661 for (var i = 0; i < targets.length; ++i) | |
662 isAcquiredInSomeTarget = isAcquiredInSomeTarget || targets[i].profil
ingLock.isAcquired(); | |
663 var enable = toggled || !isAcquiredInSomeTarget; | 660 var enable = toggled || !isAcquiredInSomeTarget; |
664 this.recordButton.setEnabled(enable); | 661 this.recordButton.setEnabled(enable); |
665 this.recordButton.toggled = toggled; | 662 this.recordButton.toggled = toggled; |
666 if (enable) | 663 if (enable) |
667 this.recordButton.title = this._selectedProfileType ? this._selected
ProfileType.buttonTooltip : ""; | 664 this.recordButton.title = this._selectedProfileType ? this._selected
ProfileType.buttonTooltip : ""; |
668 else | 665 else |
669 this.recordButton.title = WebInspector.anotherProfilerActiveLabel(); | 666 this.recordButton.title = WebInspector.anotherProfilerActiveLabel(); |
670 if (this._selectedProfileType) | 667 if (this._selectedProfileType) |
671 this._launcherView.updateProfileType(this._selectedProfileType, enab
le); | 668 this._launcherView.updateProfileType(this._selectedProfileType, enab
le); |
672 }, | 669 }, |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 importScript("HeapSnapshotCommon.js"); | 1360 importScript("HeapSnapshotCommon.js"); |
1364 importScript("HeapSnapshotProxy.js"); | 1361 importScript("HeapSnapshotProxy.js"); |
1365 importScript("HeapSnapshotDataGrids.js"); | 1362 importScript("HeapSnapshotDataGrids.js"); |
1366 importScript("HeapSnapshotGridNodes.js"); | 1363 importScript("HeapSnapshotGridNodes.js"); |
1367 importScript("HeapSnapshotView.js"); | 1364 importScript("HeapSnapshotView.js"); |
1368 importScript("ProfileLauncherView.js"); | 1365 importScript("ProfileLauncherView.js"); |
1369 importScript("CanvasProfileView.js"); | 1366 importScript("CanvasProfileView.js"); |
1370 importScript("CanvasReplayStateView.js"); | 1367 importScript("CanvasReplayStateView.js"); |
1371 | 1368 |
1372 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); | 1369 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); |
OLD | NEW |