| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 */ | 101 */ |
| 102 _frameAdded(event) { | 102 _frameAdded(event) { |
| 103 var frame = /** @type {!SDK.NetworkRequest.WebSocketFrame} */ (event.data); | 103 var frame = /** @type {!SDK.NetworkRequest.WebSocketFrame} */ (event.data); |
| 104 this._dataGrid.insertChild(new Network.ResourceWebSocketFrameNode(this._requ
est.url, frame)); | 104 this._dataGrid.insertChild(new Network.ResourceWebSocketFrameNode(this._requ
est.url, frame)); |
| 105 } | 105 } |
| 106 | 106 |
| 107 /** | 107 /** |
| 108 * @param {!Common.Event} event | 108 * @param {!Common.Event} event |
| 109 */ | 109 */ |
| 110 _onFrameSelected(event) { | 110 _onFrameSelected(event) { |
| 111 var selectedNode = /** @type {!Network.ResourceWebSocketFrameNode} */ (event
.target.selectedNode); | 111 var selectedNode = /** @type {!Network.ResourceWebSocketFrameNode} */ (event
.data); |
| 112 this._currentSelectedNode = selectedNode; | 112 this._currentSelectedNode = selectedNode; |
| 113 var contentProvider = selectedNode.contentProvider(); | 113 var contentProvider = selectedNode.contentProvider(); |
| 114 contentProvider.requestContent().then(contentHandler.bind(this)); | 114 contentProvider.requestContent().then(contentHandler.bind(this)); |
| 115 | 115 |
| 116 /** | 116 /** |
| 117 * @param {(string|null)} content | 117 * @param {(string|null)} content |
| 118 * @this {Network.ResourceWebSocketFrameView} | 118 * @this {Network.ResourceWebSocketFrameView} |
| 119 */ | 119 */ |
| 120 function contentHandler(content) { | 120 function contentHandler(content) { |
| 121 if (this._currentSelectedNode !== selectedNode) | 121 if (this._currentSelectedNode !== selectedNode) |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 }; | 240 }; |
| 241 | 241 |
| 242 /** | 242 /** |
| 243 * @param {!Network.ResourceWebSocketFrameNode} a | 243 * @param {!Network.ResourceWebSocketFrameNode} a |
| 244 * @param {!Network.ResourceWebSocketFrameNode} b | 244 * @param {!Network.ResourceWebSocketFrameNode} b |
| 245 * @return {number} | 245 * @return {number} |
| 246 */ | 246 */ |
| 247 Network.ResourceWebSocketFrameNodeTimeComparator = function(a, b) { | 247 Network.ResourceWebSocketFrameNodeTimeComparator = function(a, b) { |
| 248 return a._frame.time - b._frame.time; | 248 return a._frame.time - b._frame.time; |
| 249 }; | 249 }; |
| OLD | NEW |