| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 * @override | 497 * @override |
| 498 * @return {!Array.<!Element>} | 498 * @return {!Array.<!Element>} |
| 499 */ | 499 */ |
| 500 elementsToRestoreScrollPositionsFor() { | 500 elementsToRestoreScrollPositionsFor() { |
| 501 if (!this._dataGrid) // Not initialized yet. | 501 if (!this._dataGrid) // Not initialized yet. |
| 502 return []; | 502 return []; |
| 503 return [this._dataGrid.scrollContainer]; | 503 return [this._dataGrid.scrollContainer]; |
| 504 } | 504 } |
| 505 | 505 |
| 506 _setupDataGrid() { | 506 _setupDataGrid() { |
| 507 /** @type {!UI.SortableDataGrid} */ | |
| 508 this._dataGrid = this._columns.dataGrid(); | 507 this._dataGrid = this._columns.dataGrid(); |
| 509 this._dataGrid.setRowContextMenuCallback( | 508 this._dataGrid.setRowContextMenuCallback( |
| 510 (contextMenu, node) => this.handleContextMenuForRequest(contextMenu, nod
e.request())); | 509 (contextMenu, node) => this.handleContextMenuForRequest(contextMenu, nod
e.request())); |
| 511 this._dataGrid.setStickToBottom(true); | 510 this._dataGrid.setStickToBottom(true); |
| 512 this._dataGrid.setName('networkLog'); | 511 this._dataGrid.setName('networkLog'); |
| 513 this._dataGrid.setResizeMethod(UI.DataGrid.ResizeMethod.Last); | 512 this._dataGrid.setResizeMethod(UI.DataGrid.ResizeMethod.Last); |
| 514 this._dataGrid.element.classList.add('network-log-grid'); | 513 this._dataGrid.element.classList.add('network-log-grid'); |
| 515 this._dataGrid.element.addEventListener('mousedown', this._dataGridMouseDown
.bind(this), true); | 514 this._dataGrid.element.addEventListener('mousedown', this._dataGridMouseDown
.bind(this), true); |
| 516 this._dataGrid.element.addEventListener('mousemove', this._dataGridMouseMove
.bind(this), true); | 515 this._dataGrid.element.addEventListener('mousemove', this._dataGridMouseMove
.bind(this), true); |
| 517 this._dataGrid.element.addEventListener('mouseleave', this._dataGridMouseLea
ve.bind(this), true); | 516 this._dataGrid.element.addEventListener('mouseleave', this._dataGridMouseLea
ve.bind(this), true); |
| 518 } | 517 } |
| 519 | 518 |
| 520 /** | 519 /** |
| 521 * @param {!Event} event | 520 * @param {!Event} event |
| 522 */ | 521 */ |
| 523 _dataGridMouseMove(event) { | 522 _dataGridMouseMove(event) { |
| 524 var node = /** @type {?Network.NetworkDataGridNode} */ ( | 523 var node = this._dataGrid.dataGridNodeFromNode(event.target); |
| 525 this._dataGrid.dataGridNodeFromNode(/** @type {!Node} */ (event.target))
); | |
| 526 var highlightInitiatorChain = event.shiftKey; | 524 var highlightInitiatorChain = event.shiftKey; |
| 527 this._setHoveredNode(node, highlightInitiatorChain); | 525 this._setHoveredNode(node, highlightInitiatorChain); |
| 528 this._highlightInitiatorChain((highlightInitiatorChain && node) ? node.reque
st() : null); | 526 this._highlightInitiatorChain((highlightInitiatorChain && node) ? node.reque
st() : null); |
| 529 } | 527 } |
| 530 | 528 |
| 531 _dataGridMouseLeave() { | 529 _dataGridMouseLeave() { |
| 532 this._setHoveredNode(null); | 530 this._setHoveredNode(null); |
| 533 this._highlightInitiatorChain(null); | 531 this._highlightInitiatorChain(null); |
| 534 } | 532 } |
| 535 | 533 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 * @override | 777 * @override |
| 780 */ | 778 */ |
| 781 willHide() { | 779 willHide() { |
| 782 this._columns.willHide(); | 780 this._columns.willHide(); |
| 783 } | 781 } |
| 784 | 782 |
| 785 /** | 783 /** |
| 786 * @return {!Array<!Network.NetworkDataGridNode>} | 784 * @return {!Array<!Network.NetworkDataGridNode>} |
| 787 */ | 785 */ |
| 788 flatNodesList() { | 786 flatNodesList() { |
| 789 return this._dataGrid.rootNode().flattenChildren(); | 787 return this._dataGrid.flatNodesList(); |
| 790 } | 788 } |
| 791 | 789 |
| 792 _refresh() { | 790 _refresh() { |
| 793 this._needsRefresh = false; | 791 this._needsRefresh = false; |
| 794 | 792 |
| 795 if (this._refreshRequestId) { | 793 if (this._refreshRequestId) { |
| 796 this.element.window().cancelAnimationFrame(this._refreshRequestId); | 794 this.element.window().cancelAnimationFrame(this._refreshRequestId); |
| 797 delete this._refreshRequestId; | 795 delete this._refreshRequestId; |
| 798 } | 796 } |
| 799 | 797 |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 Running: 'running', | 1714 Running: 'running', |
| 1717 FromCache: 'from-cache' | 1715 FromCache: 'from-cache' |
| 1718 }; | 1716 }; |
| 1719 | 1717 |
| 1720 /** @type {!Array<string>} */ | 1718 /** @type {!Array<string>} */ |
| 1721 Network.NetworkLogView._searchKeys = | 1719 Network.NetworkLogView._searchKeys = |
| 1722 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog
View.FilterType[key]); | 1720 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog
View.FilterType[key]); |
| 1723 | 1721 |
| 1724 /** @typedef {function(!SDK.NetworkRequest): boolean} */ | 1722 /** @typedef {function(!SDK.NetworkRequest): boolean} */ |
| 1725 Network.NetworkLogView.Filter; | 1723 Network.NetworkLogView.Filter; |
| OLD | NEW |