| 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 26 matching lines...) Expand all Loading... |
| 37 * @param {string} url | 37 * @param {string} url |
| 38 * @param {string} documentURL | 38 * @param {string} documentURL |
| 39 * @param {!PageAgent.FrameId} frameId | 39 * @param {!PageAgent.FrameId} frameId |
| 40 * @param {!NetworkAgent.LoaderId} loaderId | 40 * @param {!NetworkAgent.LoaderId} loaderId |
| 41 * @param {?NetworkAgent.Initiator} initiator | 41 * @param {?NetworkAgent.Initiator} initiator |
| 42 */ | 42 */ |
| 43 WebInspector.NetworkRequest = function(target, requestId, url, documentURL, fram
eId, loaderId, initiator) | 43 WebInspector.NetworkRequest = function(target, requestId, url, documentURL, fram
eId, loaderId, initiator) |
| 44 { | 44 { |
| 45 WebInspector.SDKObject.call(this, target); | 45 WebInspector.SDKObject.call(this, target); |
| 46 | 46 |
| 47 this._networkLog = /** @type {!WebInspector.NetworkLog} */ (WebInspector.Net
workLog.fromTarget(target)); |
| 48 this._networkManager = /** @type {!WebInspector.NetworkManager} */ (WebInspe
ctor.NetworkManager.fromTarget(target)); |
| 47 this._requestId = requestId; | 49 this._requestId = requestId; |
| 48 this.url = url; | 50 this.url = url; |
| 49 this._documentURL = documentURL; | 51 this._documentURL = documentURL; |
| 50 this._frameId = frameId; | 52 this._frameId = frameId; |
| 51 this._loaderId = loaderId; | 53 this._loaderId = loaderId; |
| 52 /** @type {?NetworkAgent.Initiator} */ | 54 /** @type {?NetworkAgent.Initiator} */ |
| 53 this._initiator = initiator; | 55 this._initiator = initiator; |
| 54 this._issueTime = -1; | 56 this._issueTime = -1; |
| 55 this._startTime = -1; | 57 this._startTime = -1; |
| 56 this._endTime = -1; | 58 this._endTime = -1; |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 this._initiatorInfo = {type: type, url: url, lineNumber: lineNumber, col
umnNumber: columnNumber, scriptId: scriptId}; | 1119 this._initiatorInfo = {type: type, url: url, lineNumber: lineNumber, col
umnNumber: columnNumber, scriptId: scriptId}; |
| 1118 return this._initiatorInfo; | 1120 return this._initiatorInfo; |
| 1119 }, | 1121 }, |
| 1120 | 1122 |
| 1121 /** | 1123 /** |
| 1122 * @return {?WebInspector.NetworkRequest} | 1124 * @return {?WebInspector.NetworkRequest} |
| 1123 */ | 1125 */ |
| 1124 initiatorRequest: function() | 1126 initiatorRequest: function() |
| 1125 { | 1127 { |
| 1126 if (this._initiatorRequest === undefined) | 1128 if (this._initiatorRequest === undefined) |
| 1127 this._initiatorRequest = this.target().networkLog.requestForURL(this
.initiatorInfo().url); | 1129 this._initiatorRequest = this._networkLog.requestForURL(this.initiat
orInfo().url); |
| 1128 return this._initiatorRequest; | 1130 return this._initiatorRequest; |
| 1129 }, | 1131 }, |
| 1130 | 1132 |
| 1131 /** | 1133 /** |
| 1132 * @return {!Set<!WebInspector.NetworkRequest>} | 1134 * @return {!Set<!WebInspector.NetworkRequest>} |
| 1133 */ | 1135 */ |
| 1134 initiatorChain: function() | 1136 initiatorChain: function() |
| 1135 { | 1137 { |
| 1136 if (this._initiatorChain) | 1138 if (this._initiatorChain) |
| 1137 return this._initiatorChain; | 1139 return this._initiatorChain; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 var message = {time: this.pseudoWallTime(time), eventName: eventName, ev
entId: eventId, data: data}; | 1202 var message = {time: this.pseudoWallTime(time), eventName: eventName, ev
entId: eventId, data: data}; |
| 1201 this._eventSourceMessages.push(message); | 1203 this._eventSourceMessages.push(message); |
| 1202 this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.EventSo
urceMessageAdded, message); | 1204 this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.EventSo
urceMessageAdded, message); |
| 1203 }, | 1205 }, |
| 1204 | 1206 |
| 1205 replayXHR: function() | 1207 replayXHR: function() |
| 1206 { | 1208 { |
| 1207 this.target().networkAgent().replayXHR(this.requestId); | 1209 this.target().networkAgent().replayXHR(this.requestId); |
| 1208 }, | 1210 }, |
| 1209 | 1211 |
| 1212 /** |
| 1213 * @return {!WebInspector.NetworkLog} |
| 1214 */ |
| 1215 networkLog: function() |
| 1216 { |
| 1217 return this._networkLog; |
| 1218 }, |
| 1219 |
| 1220 /** |
| 1221 * @return {!WebInspector.NetworkManager} |
| 1222 */ |
| 1223 networkManager: function() |
| 1224 { |
| 1225 return this._networkManager; |
| 1226 }, |
| 1227 |
| 1210 __proto__: WebInspector.SDKObject.prototype | 1228 __proto__: WebInspector.SDKObject.prototype |
| 1211 } | 1229 } |
| OLD | NEW |