| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 /** | 434 /** |
| 435 * @param {!UI.ContextMenu} contextMenu | 435 * @param {!UI.ContextMenu} contextMenu |
| 436 * @param {!Event} event | 436 * @param {!Event} event |
| 437 */ | 437 */ |
| 438 populateContextMenu(contextMenu, event) { | 438 populateContextMenu(contextMenu, event) { |
| 439 if (this._dataGrid) | 439 if (this._dataGrid) |
| 440 this._dataGrid.populateContextMenu(contextMenu, event); | 440 this._dataGrid.populateContextMenu(contextMenu, event); |
| 441 } | 441 } |
| 442 | 442 |
| 443 /** |
| 444 * @param {!Common.Event} event |
| 445 */ |
| 443 _selectionChanged(event) { | 446 _selectionChanged(event) { |
| 444 var selectedNode = event.target.selectedNode; | 447 var selectedNode = /** @type {!Profiler.HeapSnapshotGridNode} */ (event.data
); |
| 445 this._setSelectedNodeForDetailsView(selectedNode); | 448 this._setSelectedNodeForDetailsView(selectedNode); |
| 446 this._inspectedObjectChanged(event); | 449 this._inspectedObjectChanged(event); |
| 447 } | 450 } |
| 448 | 451 |
| 452 /** |
| 453 * @param {!Common.Event} event |
| 454 */ |
| 449 _onSelectAllocationNode(event) { | 455 _onSelectAllocationNode(event) { |
| 450 var selectedNode = event.target.selectedNode; | 456 var selectedNode = /** @type {!UI.DataGridNode} */ (event.data); |
| 451 this._constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId
()); | 457 this._constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId
()); |
| 452 this._setSelectedNodeForDetailsView(null); | 458 this._setSelectedNodeForDetailsView(null); |
| 453 } | 459 } |
| 454 | 460 |
| 461 /** |
| 462 * @param {!Common.Event} event |
| 463 */ |
| 455 _inspectedObjectChanged(event) { | 464 _inspectedObjectChanged(event) { |
| 456 var selectedNode = event.target.selectedNode; | 465 var selectedNode = /** @type {!UI.DataGridNode} */ (event.data); |
| 457 var target = this._profile.target(); | 466 var target = this._profile.target(); |
| 458 if (target && selectedNode instanceof Profiler.HeapSnapshotGenericObjectNode
) | 467 if (target && selectedNode instanceof Profiler.HeapSnapshotGenericObjectNode
) |
| 459 target.heapProfilerAgent().addInspectedHeapObject(String(selectedNode.snap
shotNodeId)); | 468 target.heapProfilerAgent().addInspectedHeapObject(String(selectedNode.snap
shotNodeId)); |
| 460 } | 469 } |
| 461 | 470 |
| 462 /** | 471 /** |
| 463 * @param {?Profiler.HeapSnapshotGridNode} nodeItem | 472 * @param {?Profiler.HeapSnapshotGridNode} nodeItem |
| 464 */ | 473 */ |
| 465 _setSelectedNodeForDetailsView(nodeItem) { | 474 _setSelectedNodeForDetailsView(nodeItem) { |
| 466 var dataSource = nodeItem && nodeItem.retainersDataSource(); | 475 var dataSource = nodeItem && nodeItem.retainersDataSource(); |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2082 var name = frameDiv.createChild('div'); | 2091 var name = frameDiv.createChild('div'); |
| 2083 name.textContent = UI.beautifyFunctionName(frame.functionName); | 2092 name.textContent = UI.beautifyFunctionName(frame.functionName); |
| 2084 if (frame.scriptId) { | 2093 if (frame.scriptId) { |
| 2085 var urlElement = this._linkifier.linkifyScriptLocation( | 2094 var urlElement = this._linkifier.linkifyScriptLocation( |
| 2086 this._target, String(frame.scriptId), frame.scriptName, frame.line -
1, frame.column - 1); | 2095 this._target, String(frame.scriptId), frame.scriptName, frame.line -
1, frame.column - 1); |
| 2087 frameDiv.appendChild(urlElement); | 2096 frameDiv.appendChild(urlElement); |
| 2088 } | 2097 } |
| 2089 } | 2098 } |
| 2090 } | 2099 } |
| 2091 }; | 2100 }; |
| OLD | NEW |