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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 WebInspector.ProfileType.Events = { | 45 WebInspector.ProfileType.Events = { |
46 AddProfileHeader: "add-profile-header", | 46 AddProfileHeader: "add-profile-header", |
47 RemoveProfileHeader: "remove-profile-header", | 47 RemoveProfileHeader: "remove-profile-header", |
48 ProgressUpdated: "progress-updated", | 48 ProgressUpdated: "progress-updated", |
49 ViewUpdated: "view-updated" | 49 ViewUpdated: "view-updated" |
50 } | 50 } |
51 | 51 |
52 WebInspector.ProfileType.prototype = { | 52 WebInspector.ProfileType.prototype = { |
| 53 hasTemporaryView: function() |
| 54 { |
| 55 return false; |
| 56 }, |
| 57 |
53 /** | 58 /** |
54 * @return {string|null} | 59 * @return {string|null} |
55 */ | 60 */ |
56 fileExtension: function() | 61 fileExtension: function() |
57 { | 62 { |
58 return null; | 63 return null; |
59 }, | 64 }, |
60 | 65 |
61 get statusBarItems() | 66 get statusBarItems() |
62 { | 67 { |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 sidebarParent.hidden = !this._singleProfileMode; | 765 sidebarParent.hidden = !this._singleProfileMode; |
761 } | 766 } |
762 }, | 767 }, |
763 | 768 |
764 /** | 769 /** |
765 * @param {!WebInspector.ProfileHeader} profile | 770 * @param {!WebInspector.ProfileHeader} profile |
766 * @return {WebInspector.View} | 771 * @return {WebInspector.View} |
767 */ | 772 */ |
768 _showProfile: function(profile) | 773 _showProfile: function(profile) |
769 { | 774 { |
770 if (!profile || profile.isTemporary) | 775 if (!profile || (profile.isTemporary && !profile.profileType().hasTempor
aryView())) |
771 return null; | 776 return null; |
772 | 777 |
773 var view = profile.view(this); | 778 var view = profile.view(this); |
774 if (view === this.visibleView) | 779 if (view === this.visibleView) |
775 return view; | 780 return view; |
776 | 781 |
777 this.closeVisibleView(); | 782 this.closeVisibleView(); |
778 | 783 |
779 view.show(this.profileViews); | 784 view.show(this.profileViews); |
780 | 785 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 * @param {boolean} isProfiling | 1125 * @param {boolean} isProfiling |
1121 */ | 1126 */ |
1122 setRecordingProfile: function(profileType, isProfiling) | 1127 setRecordingProfile: function(profileType, isProfiling) |
1123 { | 1128 { |
1124 var profileTypeObject = this.getProfileType(profileType); | 1129 var profileTypeObject = this.getProfileType(profileType); |
1125 this.recordButton.toggled = isProfiling; | 1130 this.recordButton.toggled = isProfiling; |
1126 this.recordButton.title = profileTypeObject.buttonTooltip; | 1131 this.recordButton.title = profileTypeObject.buttonTooltip; |
1127 if (isProfiling) { | 1132 if (isProfiling) { |
1128 this._launcherView.profileStarted(); | 1133 this._launcherView.profileStarted(); |
1129 this._createTemporaryProfile(profileType); | 1134 this._createTemporaryProfile(profileType); |
| 1135 if (profileTypeObject.hasTemporaryView()) |
| 1136 this._showProfile(profileTypeObject.findTemporaryProfile()); |
1130 } else | 1137 } else |
1131 this._launcherView.profileFinished(); | 1138 this._launcherView.profileFinished(); |
1132 }, | 1139 }, |
1133 | 1140 |
1134 /** | 1141 /** |
1135 * @param {!WebInspector.ProfileHeader} profile | 1142 * @param {!WebInspector.ProfileHeader} profile |
1136 * @param {number} done | 1143 * @param {number} done |
1137 * @param {number} total | 1144 * @param {number} total |
1138 */ | 1145 */ |
1139 _reportProfileProgress: function(profile, done, total) | 1146 _reportProfileProgress: function(profile, done, total) |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 importScript("HeapSnapshotLoader.js"); | 1414 importScript("HeapSnapshotLoader.js"); |
1408 importScript("HeapSnapshotProxy.js"); | 1415 importScript("HeapSnapshotProxy.js"); |
1409 importScript("HeapSnapshotView.js"); | 1416 importScript("HeapSnapshotView.js"); |
1410 importScript("HeapSnapshotWorkerDispatcher.js"); | 1417 importScript("HeapSnapshotWorkerDispatcher.js"); |
1411 importScript("JSHeapSnapshot.js"); | 1418 importScript("JSHeapSnapshot.js"); |
1412 importScript("NativeHeapSnapshot.js"); | 1419 importScript("NativeHeapSnapshot.js"); |
1413 importScript("NativeMemorySnapshotView.js"); | 1420 importScript("NativeMemorySnapshotView.js"); |
1414 importScript("ProfileLauncherView.js"); | 1421 importScript("ProfileLauncherView.js"); |
1415 importScript("TopDownProfileDataGridTree.js"); | 1422 importScript("TopDownProfileDataGridTree.js"); |
1416 importScript("CanvasProfileView.js"); | 1423 importScript("CanvasProfileView.js"); |
OLD | NEW |