| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 if (profile.profileType().id === WebInspector.TrackingHeapSnapshotProfileTyp
e.TypeId) { | 48 if (profile.profileType().id === WebInspector.TrackingHeapSnapshotProfileTyp
e.TypeId) { |
| 49 this._trackingOverviewGrid = new WebInspector.HeapTrackingOverviewGrid(p
rofile); | 49 this._trackingOverviewGrid = new WebInspector.HeapTrackingOverviewGrid(p
rofile); |
| 50 this._trackingOverviewGrid.addEventListener(WebInspector.HeapTrackingOve
rviewGrid.IdsRangeChanged, this._onIdsRangeChanged.bind(this)); | 50 this._trackingOverviewGrid.addEventListener(WebInspector.HeapTrackingOve
rviewGrid.IdsRangeChanged, this._onIdsRangeChanged.bind(this)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 this._parentDataDisplayDelegate = dataDisplayDelegate; | 53 this._parentDataDisplayDelegate = dataDisplayDelegate; |
| 54 | 54 |
| 55 this._searchableView = new WebInspector.SearchableView(this); | 55 this._searchableView = new WebInspector.SearchableView(this); |
| 56 this._searchableView.show(this.element); | 56 this._searchableView.show(this.element); |
| 57 | 57 |
| 58 this._splitView = new WebInspector.SplitView(false, true, "heapSnapshotSplit
ViewState", 200, 200); | 58 this._splitWidget = new WebInspector.SplitWidget(false, true, "heapSnapshotS
plitViewState", 200, 200); |
| 59 this._splitView.show(this._searchableView.element); | 59 this._splitWidget.show(this._searchableView.element); |
| 60 | 60 |
| 61 this._containmentView = new WebInspector.VBox(); | 61 this._containmentWidget = new WebInspector.VBox(); |
| 62 this._containmentView.setMinimumSize(50, 25); | 62 this._containmentWidget.setMinimumSize(50, 25); |
| 63 this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid
(this); | 63 this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid
(this); |
| 64 this._containmentDataGrid.show(this._containmentView.element); | 64 this._containmentDataGrid.show(this._containmentWidget.element); |
| 65 this._containmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Sele
ctedNode, this._selectionChanged, this); | 65 this._containmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Sele
ctedNode, this._selectionChanged, this); |
| 66 | 66 |
| 67 this._statisticsView = new WebInspector.HeapSnapshotStatisticsView(); | 67 this._statisticsView = new WebInspector.HeapSnapshotStatisticsView(); |
| 68 | 68 |
| 69 this._constructorsView = new WebInspector.VBox(); | 69 this._constructorsWidget = new WebInspector.VBox(); |
| 70 this._constructorsView.setMinimumSize(50, 25); | 70 this._constructorsWidget.setMinimumSize(50, 25); |
| 71 | 71 |
| 72 this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGr
id(this); | 72 this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGr
id(this); |
| 73 this._constructorsDataGrid.show(this._constructorsView.element); | 73 this._constructorsDataGrid.show(this._constructorsWidget.element); |
| 74 this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.Sel
ectedNode, this._selectionChanged, this); | 74 this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.Sel
ectedNode, this._selectionChanged, this); |
| 75 | 75 |
| 76 this._diffView = new WebInspector.VBox(); | 76 this._diffWidget = new WebInspector.VBox(); |
| 77 this._diffView.setMinimumSize(50, 25); | 77 this._diffWidget.setMinimumSize(50, 25); |
| 78 | 78 |
| 79 this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(this); | 79 this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(this); |
| 80 this._diffDataGrid.show(this._diffView.element); | 80 this._diffDataGrid.show(this._diffWidget.element); |
| 81 this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNod
e, this._selectionChanged, this); | 81 this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNod
e, this._selectionChanged, this); |
| 82 | 82 |
| 83 if (profile._hasAllocationStacks) { | 83 if (profile._hasAllocationStacks) { |
| 84 this._allocationView = new WebInspector.VBox(); | 84 this._allocationWidget = new WebInspector.VBox(); |
| 85 this._allocationView.setMinimumSize(50, 25); | 85 this._allocationWidget.setMinimumSize(50, 25); |
| 86 this._allocationDataGrid = new WebInspector.AllocationDataGrid(profile.t
arget() , this); | 86 this._allocationDataGrid = new WebInspector.AllocationDataGrid(profile.t
arget() , this); |
| 87 this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.S
electedNode, this._onSelectAllocationNode, this); | 87 this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.S
electedNode, this._onSelectAllocationNode, this); |
| 88 this._allocationDataGrid.show(this._allocationView.element); | 88 this._allocationDataGrid.show(this._allocationWidget.element); |
| 89 | 89 |
| 90 this._allocationStackView = new WebInspector.HeapAllocationStackView(pro
file.target()); | 90 this._allocationStackView = new WebInspector.HeapAllocationStackView(pro
file.target()); |
| 91 this._allocationStackView.setMinimumSize(50, 25); | 91 this._allocationStackView.setMinimumSize(50, 25); |
| 92 | 92 |
| 93 this._tabbedPane = new WebInspector.TabbedPane(); | 93 this._tabbedPane = new WebInspector.TabbedPane(); |
| 94 this._tabbedPane.setCloseableTabs(false); | 94 this._tabbedPane.setCloseableTabs(false); |
| 95 this._tabbedPane.headerElement().classList.add("heap-object-details-head
er"); | 95 this._tabbedPane.headerElement().classList.add("heap-object-details-head
er"); |
| 96 } | 96 } |
| 97 | 97 |
| 98 this._retainmentView = new WebInspector.VBox(); | 98 this._retainmentWidget = new WebInspector.VBox(); |
| 99 this._retainmentView.setMinimumSize(50, 21); | 99 this._retainmentWidget.setMinimumSize(50, 21); |
| 100 this._retainmentView.element.classList.add("retaining-paths-view"); | 100 this._retainmentWidget.element.classList.add("retaining-paths-view"); |
| 101 | 101 |
| 102 var splitViewResizer; | 102 var splitWidgetResizer; |
| 103 if (this._allocationStackView) { | 103 if (this._allocationStackView) { |
| 104 this._tabbedPane = new WebInspector.TabbedPane(); | 104 this._tabbedPane = new WebInspector.TabbedPane(); |
| 105 this._tabbedPane.setCloseableTabs(false); | 105 this._tabbedPane.setCloseableTabs(false); |
| 106 this._tabbedPane.headerElement().classList.add("heap-object-details-head
er"); | 106 this._tabbedPane.headerElement().classList.add("heap-object-details-head
er"); |
| 107 | 107 |
| 108 this._tabbedPane.appendTab("retainers", WebInspector.UIString("Retainers
"), this._retainmentView); | 108 this._tabbedPane.appendTab("retainers", WebInspector.UIString("Retainers
"), this._retainmentWidget); |
| 109 this._tabbedPane.appendTab("allocation-stack", WebInspector.UIString("Al
location stack"), this._allocationStackView); | 109 this._tabbedPane.appendTab("allocation-stack", WebInspector.UIString("Al
location stack"), this._allocationStackView); |
| 110 | 110 |
| 111 splitViewResizer = this._tabbedPane.headerElement(); | 111 splitWidgetResizer = this._tabbedPane.headerElement(); |
| 112 this._objectDetailsView = this._tabbedPane; | 112 this._objectDetailsView = this._tabbedPane; |
| 113 } else { | 113 } else { |
| 114 var retainmentViewHeader = createElementWithClass("div", "heap-snapshot-
view-resizer"); | 114 var retainmentViewHeader = createElementWithClass("div", "heap-snapshot-
view-resizer"); |
| 115 var retainingPathsTitleDiv = retainmentViewHeader.createChild("div", "ti
tle"); | 115 var retainingPathsTitleDiv = retainmentViewHeader.createChild("div", "ti
tle"); |
| 116 var retainingPathsTitle = retainingPathsTitleDiv.createChild("span"); | 116 var retainingPathsTitle = retainingPathsTitleDiv.createChild("span"); |
| 117 retainingPathsTitle.textContent = WebInspector.UIString("Retainers"); | 117 retainingPathsTitle.textContent = WebInspector.UIString("Retainers"); |
| 118 this._retainmentView.element.appendChild(retainmentViewHeader); | 118 this._retainmentWidget.element.appendChild(retainmentViewHeader); |
| 119 | 119 |
| 120 splitViewResizer = retainmentViewHeader; | 120 splitWidgetResizer = retainmentViewHeader; |
| 121 this._objectDetailsView = this._retainmentView; | 121 this._objectDetailsView = this._retainmentWidget; |
| 122 } | 122 } |
| 123 this._splitView.hideDefaultResizer(); | 123 this._splitWidget.hideDefaultResizer(); |
| 124 this._splitView.installResizer(splitViewResizer); | 124 this._splitWidget.installResizer(splitWidgetResizer); |
| 125 | 125 |
| 126 this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid(t
his); | 126 this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid(t
his); |
| 127 this._retainmentDataGrid.show(this._retainmentView.element); | 127 this._retainmentDataGrid.show(this._retainmentWidget.element); |
| 128 this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Selec
tedNode, this._inspectedObjectChanged, this); | 128 this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Selec
tedNode, this._inspectedObjectChanged, this); |
| 129 this._retainmentDataGrid.reset(); | 129 this._retainmentDataGrid.reset(); |
| 130 | 130 |
| 131 this._perspectives = []; | 131 this._perspectives = []; |
| 132 this._perspectives.push(new WebInspector.HeapSnapshotView.SummaryPerspective
()); | 132 this._perspectives.push(new WebInspector.HeapSnapshotView.SummaryPerspective
()); |
| 133 if (profile.profileType() !== WebInspector.ProfileTypeRegistry.instance.trac
kingHeapSnapshotProfileType) | 133 if (profile.profileType() !== WebInspector.ProfileTypeRegistry.instance.trac
kingHeapSnapshotProfileType) |
| 134 this._perspectives.push(new WebInspector.HeapSnapshotView.ComparisonPers
pective()); | 134 this._perspectives.push(new WebInspector.HeapSnapshotView.ComparisonPers
pective()); |
| 135 this._perspectives.push(new WebInspector.HeapSnapshotView.ContainmentPerspec
tive()); | 135 this._perspectives.push(new WebInspector.HeapSnapshotView.ContainmentPerspec
tive()); |
| 136 if (this._allocationView) | 136 if (this._allocationWidget) |
| 137 this._perspectives.push(new WebInspector.HeapSnapshotView.AllocationPers
pective()); | 137 this._perspectives.push(new WebInspector.HeapSnapshotView.AllocationPers
pective()); |
| 138 this._perspectives.push(new WebInspector.HeapSnapshotView.StatisticsPerspect
ive()); | 138 this._perspectives.push(new WebInspector.HeapSnapshotView.StatisticsPerspect
ive()); |
| 139 | 139 |
| 140 this._perspectiveSelect = new WebInspector.ToolbarComboBox(this._onSelectedP
erspectiveChanged.bind(this)); | 140 this._perspectiveSelect = new WebInspector.ToolbarComboBox(this._onSelectedP
erspectiveChanged.bind(this)); |
| 141 for (var i = 0; i < this._perspectives.length; ++i) | 141 for (var i = 0; i < this._perspectives.length; ++i) |
| 142 this._perspectiveSelect.createOption(this._perspectives[i].title()); | 142 this._perspectiveSelect.createOption(this._perspectives[i].title()); |
| 143 | 143 |
| 144 this._profile = profile; | 144 this._profile = profile; |
| 145 | 145 |
| 146 this._baseSelect = new WebInspector.ToolbarComboBox(this._changeBase.bind(th
is)); | 146 this._baseSelect = new WebInspector.ToolbarComboBox(this._changeBase.bind(th
is)); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 /** | 187 /** |
| 188 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 188 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 189 */ | 189 */ |
| 190 deactivate: function(heapSnapshotView) | 190 deactivate: function(heapSnapshotView) |
| 191 { | 191 { |
| 192 heapSnapshotView._baseSelect.setVisible(false); | 192 heapSnapshotView._baseSelect.setVisible(false); |
| 193 heapSnapshotView._filterSelect.setVisible(false); | 193 heapSnapshotView._filterSelect.setVisible(false); |
| 194 heapSnapshotView._classNameFilter.setVisible(false); | 194 heapSnapshotView._classNameFilter.setVisible(false); |
| 195 if (heapSnapshotView._trackingOverviewGrid) | 195 if (heapSnapshotView._trackingOverviewGrid) |
| 196 heapSnapshotView._trackingOverviewGrid.detach(); | 196 heapSnapshotView._trackingOverviewGrid.detach(); |
| 197 if (heapSnapshotView._allocationView) | 197 if (heapSnapshotView._allocationWidget) |
| 198 heapSnapshotView._allocationView.detach(); | 198 heapSnapshotView._allocationWidget.detach(); |
| 199 if (heapSnapshotView._statisticsView) | 199 if (heapSnapshotView._statisticsView) |
| 200 heapSnapshotView._statisticsView.detach(); | 200 heapSnapshotView._statisticsView.detach(); |
| 201 | 201 |
| 202 heapSnapshotView._splitView.detach(); | 202 heapSnapshotView._splitWidget.detach(); |
| 203 heapSnapshotView._splitView.detachChildViews(); | 203 heapSnapshotView._splitWidget.detachChildWidgets(); |
| 204 }, | 204 }, |
| 205 | 205 |
| 206 /** | 206 /** |
| 207 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 207 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 208 * @return {?WebInspector.DataGrid} | 208 * @return {?WebInspector.DataGrid} |
| 209 */ | 209 */ |
| 210 masterGrid: function(heapSnapshotView) | 210 masterGrid: function(heapSnapshotView) |
| 211 { | 211 { |
| 212 return null; | 212 return null; |
| 213 }, | 213 }, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 238 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Summary")); | 238 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Summary")); |
| 239 } | 239 } |
| 240 | 240 |
| 241 WebInspector.HeapSnapshotView.SummaryPerspective.prototype = { | 241 WebInspector.HeapSnapshotView.SummaryPerspective.prototype = { |
| 242 /** | 242 /** |
| 243 * @override | 243 * @override |
| 244 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 244 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 245 */ | 245 */ |
| 246 activate: function(heapSnapshotView) | 246 activate: function(heapSnapshotView) |
| 247 { | 247 { |
| 248 heapSnapshotView._splitView.setMainView(heapSnapshotView._constructorsVi
ew); | 248 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._constructo
rsWidget); |
| 249 heapSnapshotView._splitView.setSidebarView(heapSnapshotView._objectDetai
lsView); | 249 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectD
etailsView); |
| 250 heapSnapshotView._splitView.show(heapSnapshotView._searchableView.elemen
t); | 250 heapSnapshotView._splitWidget.show(heapSnapshotView._searchableView.elem
ent); |
| 251 heapSnapshotView._filterSelect.setVisible(true); | 251 heapSnapshotView._filterSelect.setVisible(true); |
| 252 heapSnapshotView._classNameFilter.setVisible(true); | 252 heapSnapshotView._classNameFilter.setVisible(true); |
| 253 if (heapSnapshotView._trackingOverviewGrid) { | 253 if (heapSnapshotView._trackingOverviewGrid) { |
| 254 heapSnapshotView._trackingOverviewGrid.show(heapSnapshotView._search
ableView.element, heapSnapshotView._splitView.element); | 254 heapSnapshotView._trackingOverviewGrid.show(heapSnapshotView._search
ableView.element, heapSnapshotView._splitWidget.element); |
| 255 heapSnapshotView._trackingOverviewGrid.update(); | 255 heapSnapshotView._trackingOverviewGrid.update(); |
| 256 heapSnapshotView._trackingOverviewGrid._updateGrid(); | 256 heapSnapshotView._trackingOverviewGrid._updateGrid(); |
| 257 } | 257 } |
| 258 }, | 258 }, |
| 259 | 259 |
| 260 /** | 260 /** |
| 261 * @override | 261 * @override |
| 262 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 262 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 263 * @return {?WebInspector.DataGrid} | 263 * @return {?WebInspector.DataGrid} |
| 264 */ | 264 */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 288 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Comparison")); | 288 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Comparison")); |
| 289 } | 289 } |
| 290 | 290 |
| 291 WebInspector.HeapSnapshotView.ComparisonPerspective.prototype = { | 291 WebInspector.HeapSnapshotView.ComparisonPerspective.prototype = { |
| 292 /** | 292 /** |
| 293 * @override | 293 * @override |
| 294 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 294 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 295 */ | 295 */ |
| 296 activate: function(heapSnapshotView) | 296 activate: function(heapSnapshotView) |
| 297 { | 297 { |
| 298 heapSnapshotView._splitView.setMainView(heapSnapshotView._diffView); | 298 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._diffWidget
); |
| 299 heapSnapshotView._splitView.setSidebarView(heapSnapshotView._objectDetai
lsView); | 299 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectD
etailsView); |
| 300 heapSnapshotView._splitView.show(heapSnapshotView._searchableView.elemen
t); | 300 heapSnapshotView._splitWidget.show(heapSnapshotView._searchableView.elem
ent); |
| 301 heapSnapshotView._baseSelect.setVisible(true); | 301 heapSnapshotView._baseSelect.setVisible(true); |
| 302 heapSnapshotView._classNameFilter.setVisible(true); | 302 heapSnapshotView._classNameFilter.setVisible(true); |
| 303 }, | 303 }, |
| 304 | 304 |
| 305 /** | 305 /** |
| 306 * @override | 306 * @override |
| 307 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 307 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 308 * @return {?WebInspector.DataGrid} | 308 * @return {?WebInspector.DataGrid} |
| 309 */ | 309 */ |
| 310 masterGrid: function(heapSnapshotView) | 310 masterGrid: function(heapSnapshotView) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 333 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Containment")); | 333 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Containment")); |
| 334 } | 334 } |
| 335 | 335 |
| 336 WebInspector.HeapSnapshotView.ContainmentPerspective.prototype = { | 336 WebInspector.HeapSnapshotView.ContainmentPerspective.prototype = { |
| 337 /** | 337 /** |
| 338 * @override | 338 * @override |
| 339 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 339 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 340 */ | 340 */ |
| 341 activate: function(heapSnapshotView) | 341 activate: function(heapSnapshotView) |
| 342 { | 342 { |
| 343 heapSnapshotView._splitView.setMainView(heapSnapshotView._containmentVie
w); | 343 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._containmen
tWidget); |
| 344 heapSnapshotView._splitView.setSidebarView(heapSnapshotView._objectDetai
lsView); | 344 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectD
etailsView); |
| 345 heapSnapshotView._splitView.show(heapSnapshotView._searchableView.elemen
t); | 345 heapSnapshotView._splitWidget.show(heapSnapshotView._searchableView.elem
ent); |
| 346 }, | 346 }, |
| 347 | 347 |
| 348 /** | 348 /** |
| 349 * @override | 349 * @override |
| 350 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 350 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 351 * @return {?WebInspector.DataGrid} | 351 * @return {?WebInspector.DataGrid} |
| 352 */ | 352 */ |
| 353 masterGrid: function(heapSnapshotView) | 353 masterGrid: function(heapSnapshotView) |
| 354 { | 354 { |
| 355 return heapSnapshotView._containmentDataGrid; | 355 return heapSnapshotView._containmentDataGrid; |
| 356 }, | 356 }, |
| 357 __proto__: WebInspector.HeapSnapshotView.Perspective.prototype | 357 __proto__: WebInspector.HeapSnapshotView.Perspective.prototype |
| 358 } | 358 } |
| 359 | 359 |
| 360 /** | 360 /** |
| 361 * @constructor | 361 * @constructor |
| 362 * @extends {WebInspector.HeapSnapshotView.Perspective} | 362 * @extends {WebInspector.HeapSnapshotView.Perspective} |
| 363 */ | 363 */ |
| 364 WebInspector.HeapSnapshotView.AllocationPerspective = function() | 364 WebInspector.HeapSnapshotView.AllocationPerspective = function() |
| 365 { | 365 { |
| 366 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Allocation")); | 366 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Allocation")); |
| 367 this._allocationSplitView = new WebInspector.SplitView(false, true, "heapSna
pshotAllocationSplitViewState", 200, 200); | 367 this._allocationSplitWidget = new WebInspector.SplitWidget(false, true, "hea
pSnapshotAllocationSplitViewState", 200, 200); |
| 368 this._allocationSplitView.setSidebarView(new WebInspector.VBox()); | 368 this._allocationSplitWidget.setSidebarWidget(new WebInspector.VBox()); |
| 369 | 369 |
| 370 var resizer = createElementWithClass("div", "heap-snapshot-view-resizer"); | 370 var resizer = createElementWithClass("div", "heap-snapshot-view-resizer"); |
| 371 var title = resizer.createChild("div", "title").createChild("span"); | 371 var title = resizer.createChild("div", "title").createChild("span"); |
| 372 title.textContent = WebInspector.UIString("Live objects"); | 372 title.textContent = WebInspector.UIString("Live objects"); |
| 373 this._allocationSplitView.hideDefaultResizer(); | 373 this._allocationSplitWidget.hideDefaultResizer(); |
| 374 this._allocationSplitView.installResizer(resizer); | 374 this._allocationSplitWidget.installResizer(resizer); |
| 375 | 375 |
| 376 this._allocationSplitView.sidebarView().element.appendChild(resizer); | 376 this._allocationSplitWidget.sidebarWidget().element.appendChild(resizer); |
| 377 } | 377 } |
| 378 | 378 |
| 379 WebInspector.HeapSnapshotView.AllocationPerspective.prototype = { | 379 WebInspector.HeapSnapshotView.AllocationPerspective.prototype = { |
| 380 /** | 380 /** |
| 381 * @override | 381 * @override |
| 382 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 382 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 383 */ | 383 */ |
| 384 activate: function(heapSnapshotView) | 384 activate: function(heapSnapshotView) |
| 385 { | 385 { |
| 386 this._allocationSplitView.setMainView(heapSnapshotView._allocationView); | 386 this._allocationSplitWidget.setMainWidget(heapSnapshotView._allocationWi
dget); |
| 387 heapSnapshotView._splitView.setMainView(heapSnapshotView._constructorsVi
ew); | 387 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._constructo
rsWidget); |
| 388 heapSnapshotView._splitView.setSidebarView(heapSnapshotView._objectDetai
lsView); | 388 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectD
etailsView); |
| 389 this._allocationSplitView.setSidebarView(heapSnapshotView._splitView); | 389 this._allocationSplitWidget.setSidebarWidget(heapSnapshotView._splitWidg
et); |
| 390 this._allocationSplitView.show(heapSnapshotView._searchableView.element)
; | 390 this._allocationSplitWidget.show(heapSnapshotView._searchableView.elemen
t); |
| 391 | 391 |
| 392 heapSnapshotView._constructorsDataGrid.clear(); | 392 heapSnapshotView._constructorsDataGrid.clear(); |
| 393 var selectedNode = heapSnapshotView._allocationDataGrid.selectedNode; | 393 var selectedNode = heapSnapshotView._allocationDataGrid.selectedNode; |
| 394 if (selectedNode) | 394 if (selectedNode) |
| 395 heapSnapshotView._constructorsDataGrid.setAllocationNodeId(selectedN
ode.allocationNodeId()); | 395 heapSnapshotView._constructorsDataGrid.setAllocationNodeId(selectedN
ode.allocationNodeId()); |
| 396 }, | 396 }, |
| 397 | 397 |
| 398 /** | 398 /** |
| 399 * @override | 399 * @override |
| 400 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 400 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 401 */ | 401 */ |
| 402 deactivate: function(heapSnapshotView) | 402 deactivate: function(heapSnapshotView) |
| 403 { | 403 { |
| 404 this._allocationSplitView.detach(); | 404 this._allocationSplitWidget.detach(); |
| 405 WebInspector.HeapSnapshotView.Perspective.prototype.deactivate.call(this
, heapSnapshotView); | 405 WebInspector.HeapSnapshotView.Perspective.prototype.deactivate.call(this
, heapSnapshotView); |
| 406 }, | 406 }, |
| 407 | 407 |
| 408 /** | 408 /** |
| 409 * @override | 409 * @override |
| 410 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 410 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
| 411 * @return {?WebInspector.DataGrid} | 411 * @return {?WebInspector.DataGrid} |
| 412 */ | 412 */ |
| 413 masterGrid: function(heapSnapshotView) | 413 masterGrid: function(heapSnapshotView) |
| 414 { | 414 { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 * @return {!WebInspector.SearchableView} | 456 * @return {!WebInspector.SearchableView} |
| 457 */ | 457 */ |
| 458 searchableView: function() | 458 searchableView: function() |
| 459 { | 459 { |
| 460 return this._searchableView; | 460 return this._searchableView; |
| 461 }, | 461 }, |
| 462 | 462 |
| 463 /** | 463 /** |
| 464 * @override | 464 * @override |
| 465 * @param {?WebInspector.ProfileHeader} profile | 465 * @param {?WebInspector.ProfileHeader} profile |
| 466 * @return {?WebInspector.View} | 466 * @return {?WebInspector.Widget} |
| 467 */ | 467 */ |
| 468 showProfile: function(profile) | 468 showProfile: function(profile) |
| 469 { | 469 { |
| 470 return this._parentDataDisplayDelegate.showProfile(profile); | 470 return this._parentDataDisplayDelegate.showProfile(profile); |
| 471 }, | 471 }, |
| 472 | 472 |
| 473 /** | 473 /** |
| 474 * @override | 474 * @override |
| 475 * @param {!HeapProfilerAgent.HeapSnapshotObjectId} snapshotObjectId | 475 * @param {!HeapProfilerAgent.HeapSnapshotObjectId} snapshotObjectId |
| 476 * @param {string} perspectiveName | 476 * @param {string} perspectiveName |
| (...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 swatchDiv.classList.add("heap-snapshot-stats-empty-swatch"); | 2225 swatchDiv.classList.add("heap-snapshot-stats-empty-swatch"); |
| 2226 nameDiv.textContent = name; | 2226 nameDiv.textContent = name; |
| 2227 sizeDiv.textContent = WebInspector.HeapSnapshotStatisticsView._valueForm
atter(value); | 2227 sizeDiv.textContent = WebInspector.HeapSnapshotStatisticsView._valueForm
atter(value); |
| 2228 }, | 2228 }, |
| 2229 | 2229 |
| 2230 __proto__: WebInspector.VBox.prototype | 2230 __proto__: WebInspector.VBox.prototype |
| 2231 } | 2231 } |
| 2232 | 2232 |
| 2233 /** | 2233 /** |
| 2234 * @constructor | 2234 * @constructor |
| 2235 * @extends {WebInspector.View} | 2235 * @extends {WebInspector.Widget} |
| 2236 * @param {?WebInspector.Target} target | 2236 * @param {?WebInspector.Target} target |
| 2237 */ | 2237 */ |
| 2238 WebInspector.HeapAllocationStackView = function(target) | 2238 WebInspector.HeapAllocationStackView = function(target) |
| 2239 { | 2239 { |
| 2240 WebInspector.View.call(this); | 2240 WebInspector.Widget.call(this); |
| 2241 this._target = target;; | 2241 this._target = target;; |
| 2242 this._linkifier = new WebInspector.Linkifier(); | 2242 this._linkifier = new WebInspector.Linkifier(); |
| 2243 } | 2243 } |
| 2244 | 2244 |
| 2245 WebInspector.HeapAllocationStackView.prototype = { | 2245 WebInspector.HeapAllocationStackView.prototype = { |
| 2246 /** | 2246 /** |
| 2247 * @param {!WebInspector.HeapSnapshotProxy} snapshot | 2247 * @param {!WebInspector.HeapSnapshotProxy} snapshot |
| 2248 * @param {number} snapshotNodeIndex | 2248 * @param {number} snapshotNodeIndex |
| 2249 */ | 2249 */ |
| 2250 setAllocatedObject: function(snapshot, snapshotNodeIndex) | 2250 setAllocatedObject: function(snapshot, snapshotNodeIndex) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2276 var frameDiv = stackDiv.createChild("div", "stack-frame"); | 2276 var frameDiv = stackDiv.createChild("div", "stack-frame"); |
| 2277 var name = frameDiv.createChild("div"); | 2277 var name = frameDiv.createChild("div"); |
| 2278 name.textContent = WebInspector.beautifyFunctionName(frame.functionN
ame); | 2278 name.textContent = WebInspector.beautifyFunctionName(frame.functionN
ame); |
| 2279 if (frame.scriptId) { | 2279 if (frame.scriptId) { |
| 2280 var urlElement = this._linkifier.linkifyScriptLocation(this._tar
get, String(frame.scriptId), frame.scriptName, frame.line - 1, frame.column - 1)
; | 2280 var urlElement = this._linkifier.linkifyScriptLocation(this._tar
get, String(frame.scriptId), frame.scriptName, frame.line - 1, frame.column - 1)
; |
| 2281 frameDiv.appendChild(urlElement); | 2281 frameDiv.appendChild(urlElement); |
| 2282 } | 2282 } |
| 2283 } | 2283 } |
| 2284 }, | 2284 }, |
| 2285 | 2285 |
| 2286 __proto__: WebInspector.View.prototype | 2286 __proto__: WebInspector.Widget.prototype |
| 2287 } | 2287 } |
| OLD | NEW |