Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1044 return this._initiator; | 1044 return this._initiator; |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 /** | 1047 /** |
| 1048 * @return {!Array.<!SDK.NetworkRequest.WebSocketFrame>} | 1048 * @return {!Array.<!SDK.NetworkRequest.WebSocketFrame>} |
| 1049 */ | 1049 */ |
| 1050 frames() { | 1050 frames() { |
| 1051 return this._frames; | 1051 return this._frames; |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 clearFrames() { | |
| 1055 this._frames = []; | |
|
allada
2017/04/10 19:39:15
We cannot clear frames here this way because SDK.N
| |
| 1056 } | |
| 1057 | |
| 1054 /** | 1058 /** |
| 1055 * @param {string} errorMessage | 1059 * @param {string} errorMessage |
| 1056 * @param {number} time | 1060 * @param {number} time |
| 1057 */ | 1061 */ |
| 1058 addFrameError(errorMessage, time) { | 1062 addFrameError(errorMessage, time) { |
| 1059 this._addFrame({ | 1063 this._addFrame({ |
| 1060 type: SDK.NetworkRequest.WebSocketFrameType.Error, | 1064 type: SDK.NetworkRequest.WebSocketFrameType.Error, |
| 1061 text: errorMessage, | 1065 text: errorMessage, |
| 1062 time: this.pseudoWallTime(time), | 1066 time: this.pseudoWallTime(time), |
| 1063 opCode: -1, | 1067 opCode: -1, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1148 Send: 'send', | 1152 Send: 'send', |
| 1149 Receive: 'receive', | 1153 Receive: 'receive', |
| 1150 Error: 'error' | 1154 Error: 'error' |
| 1151 }; | 1155 }; |
| 1152 | 1156 |
| 1153 /** @typedef {!{type: SDK.NetworkRequest.WebSocketFrameType, time: number, text: string, opCode: number, mask: boolean}} */ | 1157 /** @typedef {!{type: SDK.NetworkRequest.WebSocketFrameType, time: number, text: string, opCode: number, mask: boolean}} */ |
| 1154 SDK.NetworkRequest.WebSocketFrame; | 1158 SDK.NetworkRequest.WebSocketFrame; |
| 1155 | 1159 |
| 1156 /** @typedef {!{time: number, eventName: string, eventId: string, data: string}} */ | 1160 /** @typedef {!{time: number, eventName: string, eventId: string, data: string}} */ |
| 1157 SDK.NetworkRequest.EventSourceMessage; | 1161 SDK.NetworkRequest.EventSourceMessage; |
| OLD | NEW |