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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 * @this {WebInspector.CPUProfileType} | 637 * @this {WebInspector.CPUProfileType} |
638 */ | 638 */ |
639 function didStopProfiling(error, profile) | 639 function didStopProfiling(error, profile) |
640 { | 640 { |
641 if (!this._profileBeingRecorded) | 641 if (!this._profileBeingRecorded) |
642 return; | 642 return; |
643 this._profileBeingRecorded.setProtocolProfile(profile); | 643 this._profileBeingRecorded.setProtocolProfile(profile); |
644 this._profileBeingRecorded.updateStatus(""); | 644 this._profileBeingRecorded.updateStatus(""); |
645 var recordedProfile = this._profileBeingRecorded; | 645 var recordedProfile = this._profileBeingRecorded; |
646 this.setProfileBeingRecorded(null); | 646 this.setProfileBeingRecorded(null); |
647 WebInspector.panels.profiles.showProfile(recordedProfile); | 647 this.dispatchEventToListeners(WebInspector.ProfileType.Events.Profil
eComplete, recordedProfile); |
648 } | 648 } |
649 ProfilerAgent.stop(didStopProfiling.bind(this)); | 649 ProfilerAgent.stop(didStopProfiling.bind(this)); |
650 }, | 650 }, |
651 | 651 |
652 /** | 652 /** |
653 * @override | 653 * @override |
654 * @param {string} title | 654 * @param {string} title |
655 * @return {!WebInspector.ProfileHeader} | 655 * @return {!WebInspector.ProfileHeader} |
656 */ | 656 */ |
657 createProfileLoadedFromFile: function(title) | 657 createProfileLoadedFromFile: function(title) |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 /** | 746 /** |
747 * @override | 747 * @override |
748 */ | 748 */ |
749 dispose: function() | 749 dispose: function() |
750 { | 750 { |
751 this.removeTempFile(); | 751 this.removeTempFile(); |
752 }, | 752 }, |
753 | 753 |
754 /** | 754 /** |
755 * @override | 755 * @override |
| 756 * @param {!WebInspector.ProfilesPanel} panel |
756 * @return {!WebInspector.ProfileSidebarTreeElement} | 757 * @return {!WebInspector.ProfileSidebarTreeElement} |
757 */ | 758 */ |
758 createSidebarTreeElement: function() | 759 createSidebarTreeElement: function(panel) |
759 { | 760 { |
760 return new WebInspector.ProfileSidebarTreeElement(this, "profile-sidebar
-tree-item"); | 761 return new WebInspector.ProfileSidebarTreeElement(panel, this, "profile-
sidebar-tree-item"); |
761 }, | 762 }, |
762 | 763 |
763 /** | 764 /** |
764 * @override | 765 * @override |
765 * @return {!WebInspector.CPUProfileView} | 766 * @return {!WebInspector.CPUProfileView} |
766 */ | 767 */ |
767 createView: function() | 768 createView: function() |
768 { | 769 { |
769 return new WebInspector.CPUProfileView(this); | 770 return new WebInspector.CPUProfileView(this); |
770 }, | 771 }, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 _notifyTempFileReady: function() | 888 _notifyTempFileReady: function() |
888 { | 889 { |
889 if (this._onTempFileReady) { | 890 if (this._onTempFileReady) { |
890 this._onTempFileReady(); | 891 this._onTempFileReady(); |
891 this._onTempFileReady = null; | 892 this._onTempFileReady = null; |
892 } | 893 } |
893 }, | 894 }, |
894 | 895 |
895 __proto__: WebInspector.ProfileHeader.prototype | 896 __proto__: WebInspector.ProfileHeader.prototype |
896 } | 897 } |
OLD | NEW |