| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 /** @type {string} */ | 72 /** @type {string} */ |
| 73 this.connectionId = "0"; | 73 this.connectionId = "0"; |
| 74 } | 74 } |
| 75 | 75 |
| 76 WebInspector.NetworkRequest.Events = { | 76 WebInspector.NetworkRequest.Events = { |
| 77 FinishedLoading: "FinishedLoading", | 77 FinishedLoading: "FinishedLoading", |
| 78 TimingChanged: "TimingChanged", | 78 TimingChanged: "TimingChanged", |
| 79 RemoteAddressChanged: "RemoteAddressChanged", | 79 RemoteAddressChanged: "RemoteAddressChanged", |
| 80 RequestHeadersChanged: "RequestHeadersChanged", | 80 RequestHeadersChanged: "RequestHeadersChanged", |
| 81 ResponseHeadersChanged: "ResponseHeadersChanged", | 81 ResponseHeadersChanged: "ResponseHeadersChanged", |
| 82 WebsocketFrameAdded: "WebsocketFrameAdded", |
| 82 } | 83 } |
| 83 | 84 |
| 84 /** @enum {string} */ | 85 /** @enum {string} */ |
| 85 WebInspector.NetworkRequest.InitiatorType = { | 86 WebInspector.NetworkRequest.InitiatorType = { |
| 86 Other: "other", | 87 Other: "other", |
| 87 Parser: "parser", | 88 Parser: "parser", |
| 88 Redirect: "redirect", | 89 Redirect: "redirect", |
| 89 Script: "script" | 90 Script: "script" |
| 90 } | 91 } |
| 91 | 92 |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 { | 975 { |
| 975 return this._frames; | 976 return this._frames; |
| 976 }, | 977 }, |
| 977 | 978 |
| 978 /** | 979 /** |
| 979 * @param {string} errorMessage | 980 * @param {string} errorMessage |
| 980 * @param {number} time | 981 * @param {number} time |
| 981 */ | 982 */ |
| 982 addFrameError: function(errorMessage, time) | 983 addFrameError: function(errorMessage, time) |
| 983 { | 984 { |
| 984 this._frames.push({ type: WebInspector.NetworkRequest.WebSocketFrameType
.Error, text: errorMessage, time: time, opCode: -1, mask: false }); | 985 this._addFrame({ type: WebInspector.NetworkRequest.WebSocketFrameType.Er
ror, text: errorMessage, time: time, opCode: -1, mask: false }); |
| 985 }, | 986 }, |
| 986 | 987 |
| 987 /** | 988 /** |
| 988 * @param {!NetworkAgent.WebSocketFrame} response | 989 * @param {!NetworkAgent.WebSocketFrame} response |
| 989 * @param {number} time | 990 * @param {number} time |
| 990 * @param {boolean} sent | 991 * @param {boolean} sent |
| 991 */ | 992 */ |
| 992 addFrame: function(response, time, sent) | 993 addFrame: function(response, time, sent) |
| 993 { | 994 { |
| 994 var type = sent ? WebInspector.NetworkRequest.WebSocketFrameType.Send :
WebInspector.NetworkRequest.WebSocketFrameType.Receive; | 995 var type = sent ? WebInspector.NetworkRequest.WebSocketFrameType.Send :
WebInspector.NetworkRequest.WebSocketFrameType.Receive; |
| 995 this._frames.push({ type: type, text: response.payloadData, time: time,
opCode: response.opcode, mask: response.mask }); | 996 this._addFrame({ type: type, text: response.payloadData, time: time, opC
ode: response.opcode, mask: response.mask }); |
| 997 }, |
| 998 |
| 999 /** |
| 1000 * @param {!WebInspector.NetworkRequest.WebSocketFrame} frame |
| 1001 */ |
| 1002 _addFrame: function(frame) |
| 1003 { |
| 1004 this._frames.push(frame); |
| 1005 this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.Websock
etFrameAdded, frame); |
| 996 }, | 1006 }, |
| 997 | 1007 |
| 998 __proto__: WebInspector.SDKObject.prototype | 1008 __proto__: WebInspector.SDKObject.prototype |
| 999 } | 1009 } |
| OLD | NEW |