| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 2 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Lesser General Public | 5 * modify it under the terms of the GNU Lesser General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Lesser General Public License for more details. | 12 * Lesser General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU Lesser General Public | 14 * You should have received a copy of the GNU Lesser General Public |
| 15 * License along with this library; if not, write to the Free Software | 15 * License along with this library; if not, write to the Free Software |
| 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 US
A | 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 US
A |
| 17 */ | 17 */ |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * @constructor | 20 * @constructor |
| 21 * @extends {WebInspector.VBox} | 21 * @extends {WebInspector.VBox} |
| 22 * @param {!WebInspector.NetworkRequest} request | 22 * @param {!WebInspector.NetworkRequest} request |
| 23 */ | 23 */ |
| 24 WebInspector.ResourceWebSocketFrameView = function(request) | 24 WebInspector.ResourceWebSocketFrameView = function(request) |
| 25 { | 25 { |
| 26 WebInspector.VBox.call(this); | 26 WebInspector.VBox.call(this); |
| 27 this.registerRequiredCSS("webSocketFrameView.css"); | 27 this.registerRequiredCSS("webSocketFrameView.css"); |
| 28 this.element.classList.add("websocket-frame-view"); | 28 this.element.classList.add("websocket-frame-view"); |
| 29 this._request = request; | 29 this._request = request; |
| 30 this.element.removeChildren(); | |
| 31 | 30 |
| 32 var columns = [ | 31 var columns = [ |
| 33 {id: "data", title: WebInspector.UIString("Data"), sortable: false, weig
ht: 88, longText: true}, | 32 {id: "data", title: WebInspector.UIString("Data"), sortable: false, weig
ht: 88, longText: true}, |
| 34 {id: "length", title: WebInspector.UIString("Length"), sortable: false,
align: WebInspector.DataGrid.Align.Right, weight: 5}, | 33 {id: "length", title: WebInspector.UIString("Length"), sortable: false,
align: WebInspector.DataGrid.Align.Right, weight: 5}, |
| 35 {id: "time", title: WebInspector.UIString("Time"), weight: 7} | 34 {id: "time", title: WebInspector.UIString("Time"), weight: 7} |
| 36 ] | 35 ] |
| 37 | 36 |
| 38 this._dataGrid = new WebInspector.SortableDataGrid(columns, undefined, undef
ined, undefined, this._onContextMenu.bind(this)); | 37 this._dataGrid = new WebInspector.SortableDataGrid(columns, undefined, undef
ined, undefined, this._onContextMenu.bind(this)); |
| 39 this._dataGrid.setCellClass("websocket-frame-view-td"); | 38 this._dataGrid.setCellClass("websocket-frame-view-td"); |
| 40 var comparator = /** @type {!WebInspector.SortableDataGrid.NodeComparator} *
/ (WebInspector.ResourceWebSocketFrameNodeTimeComparator); | 39 var comparator = /** @type {!WebInspector.SortableDataGrid.NodeComparator} *
/ (WebInspector.ResourceWebSocketFrameNodeTimeComparator); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 150 |
| 152 /** | 151 /** |
| 153 * @param {!WebInspector.ResourceWebSocketFrameNode} a | 152 * @param {!WebInspector.ResourceWebSocketFrameNode} a |
| 154 * @param {!WebInspector.ResourceWebSocketFrameNode} b | 153 * @param {!WebInspector.ResourceWebSocketFrameNode} b |
| 155 * @return {number} | 154 * @return {number} |
| 156 */ | 155 */ |
| 157 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b) | 156 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b) |
| 158 { | 157 { |
| 159 return a._frame.time - b._frame.time; | 158 return a._frame.time - b._frame.time; |
| 160 } | 159 } |
| OLD | NEW |