| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 * @implements {UI.ContextMenu.Provider} | 6 * @implements {UI.ContextMenu.Provider} |
| 7 * @implements {UI.ActionDelegate} | 7 * @implements {UI.ActionDelegate} |
| 8 */ | 8 */ |
| 9 Profiler.HeapProfilerPanel = class extends Profiler.ProfilesPanel { | 9 Profiler.HeapProfilerPanel = class extends Profiler.ProfilesPanel { |
| 10 constructor() { | 10 constructor() { |
| 11 var registry = Profiler.ProfileTypeRegistry.instance; | 11 var registry = Profiler.ProfileTypeRegistry.instance; |
| 12 super( | 12 super( |
| 13 'heap_profiler', | 13 'heap_profiler', |
| 14 [registry.heapSnapshotProfileType, registry.samplingHeapProfileType, reg
istry.trackingHeapSnapshotProfileType], | 14 [ |
| 15 registry.cpuProfileType, registry.heapSnapshotProfileType, registry.sa
mplingHeapProfileType, |
| 16 registry.trackingHeapSnapshotProfileType |
| 17 ], |
| 15 'profiler.heap-toggle-recording'); | 18 'profiler.heap-toggle-recording'); |
| 16 } | 19 } |
| 17 | 20 |
| 18 /** | 21 /** |
| 19 * @override | 22 * @override |
| 20 * @param {!Event} event | 23 * @param {!Event} event |
| 21 * @param {!UI.ContextMenu} contextMenu | 24 * @param {!UI.ContextMenu} contextMenu |
| 22 * @param {!Object} target | 25 * @param {!Object} target |
| 23 */ | 26 */ |
| 24 appendApplicableItems(event, contextMenu, target) { | 27 appendApplicableItems(event, contextMenu, target) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // FIXME: allow to choose snapshot if there are several options. | 100 // FIXME: allow to choose snapshot if there are several options. |
| 98 if (profile.maxJSObjectId >= snapshotObjectId) { | 101 if (profile.maxJSObjectId >= snapshotObjectId) { |
| 99 this.showProfile(profile); | 102 this.showProfile(profile); |
| 100 var view = this.viewForProfile(profile); | 103 var view = this.viewForProfile(profile); |
| 101 view.selectLiveObject(perspectiveName, snapshotObjectId); | 104 view.selectLiveObject(perspectiveName, snapshotObjectId); |
| 102 break; | 105 break; |
| 103 } | 106 } |
| 104 } | 107 } |
| 105 } | 108 } |
| 106 }; | 109 }; |
| OLD | NEW |