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 |
(...skipping 18 matching lines...) Expand all Loading... |
29 this._request = request; | 29 this._request = request; |
30 this.element.removeChildren(); | 30 this.element.removeChildren(); |
31 | 31 |
32 var columns = [ | 32 var columns = [ |
33 {id: "data", title: WebInspector.UIString("Data"), sortable: false, weig
ht: 88, longText: true}, | 33 {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}, | 34 {id: "length", title: WebInspector.UIString("Length"), sortable: false,
align: WebInspector.DataGrid.Align.Right, weight: 5}, |
35 {id: "time", title: WebInspector.UIString("Time"), weight: 7} | 35 {id: "time", title: WebInspector.UIString("Time"), weight: 7} |
36 ] | 36 ] |
37 | 37 |
38 this._dataGrid = new WebInspector.SortableDataGrid(columns, undefined, undef
ined, undefined, this._onContextMenu.bind(this)); | 38 this._dataGrid = new WebInspector.SortableDataGrid(columns, undefined, undef
ined, undefined, this._onContextMenu.bind(this)); |
| 39 this._dataGrid.setCellClass("websocket-frame-view-td"); |
39 var comparator = /** @type {!WebInspector.SortableDataGrid.NodeComparator} *
/ (WebInspector.ResourceWebSocketFrameNodeTimeComparator); | 40 var comparator = /** @type {!WebInspector.SortableDataGrid.NodeComparator} *
/ (WebInspector.ResourceWebSocketFrameNodeTimeComparator); |
40 this._dataGrid.sortNodes(comparator, true); | 41 this._dataGrid.sortNodes(comparator, true); |
41 | 42 |
42 this.refresh(); | 43 this.refresh(); |
43 this._dataGrid.setName("ResourceWebSocketFrameView"); | 44 this._dataGrid.setName("ResourceWebSocketFrameView"); |
44 this._dataGrid.show(this.element); | 45 this._dataGrid.show(this.element); |
45 } | 46 } |
46 | 47 |
47 /** @enum {number} */ | 48 /** @enum {number} */ |
48 WebInspector.ResourceWebSocketFrameView.OpCodes = { | 49 WebInspector.ResourceWebSocketFrameView.OpCodes = { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 151 |
151 /** | 152 /** |
152 * @param {!WebInspector.ResourceWebSocketFrameNode} a | 153 * @param {!WebInspector.ResourceWebSocketFrameNode} a |
153 * @param {!WebInspector.ResourceWebSocketFrameNode} b | 154 * @param {!WebInspector.ResourceWebSocketFrameNode} b |
154 * @return {number} | 155 * @return {number} |
155 */ | 156 */ |
156 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b) | 157 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b) |
157 { | 158 { |
158 return a._frame.time - b._frame.time; | 159 return a._frame.time - b._frame.time; |
159 } | 160 } |
OLD | NEW |