Index: Source/devtools/front_end/profiler/HeapSnapshotView.js |
diff --git a/Source/devtools/front_end/profiler/HeapSnapshotView.js b/Source/devtools/front_end/profiler/HeapSnapshotView.js |
index af904dddbdcc04288fa9887bc22e9aad750075ad..67ec5165f6077e4ca060f57ff2f1c7092a45485c 100644 |
--- a/Source/devtools/front_end/profiler/HeapSnapshotView.js |
+++ b/Source/devtools/front_end/profiler/HeapSnapshotView.js |
@@ -31,9 +31,10 @@ |
/** |
* @constructor |
* @extends {WebInspector.VBox} |
+ * @param {!WebInspector.ProfilesPanel} panel |
* @param {!WebInspector.HeapProfileHeader} profile |
*/ |
-WebInspector.HeapSnapshotView = function(profile) |
+WebInspector.HeapSnapshotView = function(panel, profile) |
{ |
WebInspector.VBox.call(this); |
@@ -52,7 +53,7 @@ WebInspector.HeapSnapshotView = function(profile) |
this._containmentView = new WebInspector.VBox(); |
this._containmentView.setMinimumSize(50, 25); |
- this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid(); |
+ this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid(panel); |
this._containmentDataGrid.show(this._containmentView.element); |
this._containmentDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this); |
@@ -61,27 +62,27 @@ WebInspector.HeapSnapshotView = function(profile) |
this._constructorsView = new WebInspector.VBox(); |
this._constructorsView.setMinimumSize(50, 25); |
- this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGrid(); |
+ this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGrid(panel); |
this._constructorsDataGrid.show(this._constructorsView.element); |
this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this); |
this._diffView = new WebInspector.VBox(); |
this._diffView.setMinimumSize(50, 25); |
- this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(); |
+ this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(panel); |
this._diffDataGrid.show(this._diffView.element); |
this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this); |
this._dominatorView = new WebInspector.VBox(); |
this._dominatorView.setMinimumSize(50, 25); |
- this._dominatorDataGrid = new WebInspector.HeapSnapshotDominatorsDataGrid(); |
+ this._dominatorDataGrid = new WebInspector.HeapSnapshotDominatorsDataGrid(panel); |
this._dominatorDataGrid.show(this._dominatorView.element); |
this._dominatorDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this); |
if (WebInspector.experimentsSettings.allocationProfiler.isEnabled() && profile.profileType() === WebInspector.ProfileTypeRegistry.instance.trackingHeapSnapshotProfileType) { |
this._allocationView = new WebInspector.VBox(); |
this._allocationView.setMinimumSize(50, 25); |
- this._allocationDataGrid = new WebInspector.AllocationDataGrid(); |
+ this._allocationDataGrid = new WebInspector.AllocationDataGrid(panel); |
this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._onSelectAllocationNode, this); |
this._allocationDataGrid.show(this._allocationView.element); |
@@ -121,7 +122,7 @@ WebInspector.HeapSnapshotView = function(profile) |
this._splitView.hideDefaultResizer(); |
this._splitView.installResizer(splitViewResizer); |
- this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid(); |
+ this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid(panel); |
this._retainmentDataGrid.show(this._retainmentView.element); |
this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._inspectedObjectChanged, this); |
this._retainmentDataGrid.reset(); |
@@ -1225,7 +1226,7 @@ WebInspector.HeapSnapshotProfileType.prototype = { |
profile.title = WebInspector.UIString("Snapshot %d", profile.uid); |
profile._finishLoad(); |
this._profileBeingRecorded = null; |
- WebInspector.panels.profiles.showProfile(profile); |
+ WebInspector.Revealer.reveal(profile); |
yurys
2014/05/07 14:43:41
We could implement this as an event on correspondi
apavlov
2014/05/07 15:54:23
Done.
|
callback(); |
} |
HeapProfilerAgent.takeHeapSnapshot(true, didTakeHeapSnapshot.bind(this)); |
@@ -1414,7 +1415,7 @@ WebInspector.TrackingHeapSnapshotProfileType.prototype = { |
profile._finishLoad(); |
this._profileSamples = null; |
this._profileBeingRecorded = null; |
- WebInspector.panels.profiles.showProfile(profile); |
+ WebInspector.Revealer.reveal(profile); |
} |
HeapProfilerAgent.stopTrackingHeapObjects(true, didTakeHeapSnapshot.bind(this)); |
@@ -1511,11 +1512,12 @@ WebInspector.HeapProfileHeader.prototype = { |
/** |
* @override |
+ * @param {!WebInspector.ProfilesPanel} panel |
* @return {!WebInspector.HeapSnapshotView} |
*/ |
- createView: function() |
+ createView: function(panel) |
{ |
- return new WebInspector.HeapSnapshotView(this); |
+ return new WebInspector.HeapSnapshotView(panel, this); |
}, |
/** |