| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 * @return {string} | 97 * @return {string} |
| 98 */ | 98 */ |
| 99 WebInspector.ResourceWebSocketFrameView.opCodeDescription = function(opCode, mas
k) | 99 WebInspector.ResourceWebSocketFrameView.opCodeDescription = function(opCode, mas
k) |
| 100 { | 100 { |
| 101 var rawDescription = WebInspector.ResourceWebSocketFrameView.opCodeDescripti
ons[opCode] || ""; | 101 var rawDescription = WebInspector.ResourceWebSocketFrameView.opCodeDescripti
ons[opCode] || ""; |
| 102 var localizedDescription = WebInspector.UIString(rawDescription); | 102 var localizedDescription = WebInspector.UIString(rawDescription); |
| 103 return WebInspector.UIString("%s (Opcode %d%s)", localizedDescription, opCod
e, (mask ? ", mask" : "")); | 103 return WebInspector.UIString("%s (Opcode %d%s)", localizedDescription, opCod
e, (mask ? ", mask" : "")); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 WebInspector.ResourceWebSocketFrameView.prototype = { | 106 WebInspector.ResourceWebSocketFrameView.prototype = { |
| 107 /** |
| 108 * @override |
| 109 */ |
| 107 wasShown: function() | 110 wasShown: function() |
| 108 { | 111 { |
| 109 this.refresh(); | 112 this.refresh(); |
| 110 this._request.addEventListener(WebInspector.NetworkRequest.Events.Websoc
ketFrameAdded, this._frameAdded, this); | 113 this._request.addEventListener(WebInspector.NetworkRequest.Events.Websoc
ketFrameAdded, this._frameAdded, this); |
| 111 }, | 114 }, |
| 112 | 115 |
| 116 /** |
| 117 * @override |
| 118 */ |
| 113 willHide: function() | 119 willHide: function() |
| 114 { | 120 { |
| 115 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Web
socketFrameAdded, this._frameAdded, this); | 121 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Web
socketFrameAdded, this._frameAdded, this); |
| 116 }, | 122 }, |
| 117 | 123 |
| 118 /** | 124 /** |
| 119 * @param {!WebInspector.Event} event | 125 * @param {!WebInspector.Event} event |
| 120 */ | 126 */ |
| 121 _frameAdded: function(event) | 127 _frameAdded: function(event) |
| 122 { | 128 { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 252 |
| 247 /** | 253 /** |
| 248 * @param {!WebInspector.ResourceWebSocketFrameNode} a | 254 * @param {!WebInspector.ResourceWebSocketFrameNode} a |
| 249 * @param {!WebInspector.ResourceWebSocketFrameNode} b | 255 * @param {!WebInspector.ResourceWebSocketFrameNode} b |
| 250 * @return {number} | 256 * @return {number} |
| 251 */ | 257 */ |
| 252 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b) | 258 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b) |
| 253 { | 259 { |
| 254 return a._frame.time - b._frame.time; | 260 return a._frame.time - b._frame.time; |
| 255 }; | 261 }; |
| OLD | NEW |