| Index: third_party/WebKit/Source/devtools/front_end/network/ResourceWebSocketFrameView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/network/ResourceWebSocketFrameView.js b/third_party/WebKit/Source/devtools/front_end/network/ResourceWebSocketFrameView.js
|
| index 0610535e819af42c26346d6b063d4194e11911b5..3ce6a0abaf1a1720df4a7afd9705e56a87e2f5ad 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/network/ResourceWebSocketFrameView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/network/ResourceWebSocketFrameView.js
|
| @@ -37,7 +37,8 @@ WebInspector.ResourceWebSocketFrameView = function(request)
|
| {id: "time", title: WebInspector.UIString("Time"), sortable: true, weight: 7}
|
| ]);
|
|
|
| - this._dataGrid = new WebInspector.SortableDataGrid(columns, undefined, undefined, undefined, this._onContextMenu.bind(this));
|
| + this._dataGrid = new WebInspector.SortableDataGrid(columns);
|
| + this._dataGrid.setRowContextMenuCallback(onRowContextMenu);
|
| this._dataGrid.setStickToBottom(true);
|
| this._dataGrid.setCellClass("websocket-frame-view-td");
|
| this._timeComparator = /** @type {!WebInspector.SortableDataGrid.NodeComparator} */ (WebInspector.ResourceWebSocketFrameNodeTimeComparator);
|
| @@ -55,6 +56,15 @@ WebInspector.ResourceWebSocketFrameView = function(request)
|
|
|
| /** @type {?WebInspector.ResourceWebSocketFrameNode} */
|
| this._selectedNode = null;
|
| +
|
| + /**
|
| + * @param {!WebInspector.ContextMenu} contextMenu
|
| + * @param {!WebInspector.DataGridNode} node
|
| + */
|
| + function onRowContextMenu(contextMenu, node)
|
| + {
|
| + contextMenu.appendItem(WebInspector.UIString.capitalize("Copy ^message"), InspectorFrontendHost.copyText.bind(InspectorFrontendHost, node.data.data))
|
| + }
|
| };
|
|
|
| /** @enum {number} */
|
| @@ -165,23 +175,6 @@ WebInspector.ResourceWebSocketFrameView.prototype = {
|
| this._dataGrid.insertChild(new WebInspector.ResourceWebSocketFrameNode(this._request.url, frames[i]));
|
| },
|
|
|
| - /**
|
| - * @param {!WebInspector.ContextMenu} contextMenu
|
| - * @param {!WebInspector.DataGridNode} node
|
| - */
|
| - _onContextMenu: function(contextMenu, node)
|
| - {
|
| - contextMenu.appendItem(WebInspector.UIString.capitalize("Copy ^message"), this._copyMessage.bind(this, node.data));
|
| - },
|
| -
|
| - /**
|
| - * @param {!Object} row
|
| - */
|
| - _copyMessage: function(row)
|
| - {
|
| - InspectorFrontendHost.copyText(row.data);
|
| - },
|
| -
|
| _sortItems: function()
|
| {
|
| this._dataGrid.sortNodes(this._timeComparator, !this._dataGrid.isSortOrderAscending());
|
|
|