| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 this._documentURL = documentURL; | 45 this._documentURL = documentURL; |
| 46 this._frameId = frameId; | 46 this._frameId = frameId; |
| 47 this._loaderId = loaderId; | 47 this._loaderId = loaderId; |
| 48 this._startTime = -1; | 48 this._startTime = -1; |
| 49 this._endTime = -1; | 49 this._endTime = -1; |
| 50 | 50 |
| 51 this.statusCode = 0; | 51 this.statusCode = 0; |
| 52 this.statusText = ""; | 52 this.statusText = ""; |
| 53 this.requestMethod = ""; | 53 this.requestMethod = ""; |
| 54 this.requestTime = 0; | 54 this.requestTime = 0; |
| 55 this.receiveHeadersEnd = 0; | |
| 56 | 55 |
| 57 this._type = WebInspector.resourceTypes.Other; | 56 this._type = WebInspector.resourceTypes.Other; |
| 58 this._contentEncoded = false; | 57 this._contentEncoded = false; |
| 59 this._pendingContentCallbacks = []; | 58 this._pendingContentCallbacks = []; |
| 60 this._frames = []; | 59 this._frames = []; |
| 61 | 60 |
| 62 this._responseHeaderValues = {}; | 61 this._responseHeaderValues = {}; |
| 63 } | 62 } |
| 64 | 63 |
| 65 WebInspector.NetworkRequest.Events = { | 64 WebInspector.NetworkRequest.Events = { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 get latency() | 205 get latency() |
| 207 { | 206 { |
| 208 if (this._responseReceivedTime === -1 || this._startTime === -1) | 207 if (this._responseReceivedTime === -1 || this._startTime === -1) |
| 209 return -1; | 208 return -1; |
| 210 return this._responseReceivedTime - this._startTime; | 209 return this._responseReceivedTime - this._startTime; |
| 211 }, | 210 }, |
| 212 | 211 |
| 213 /** | 212 /** |
| 214 * @return {number} | 213 * @return {number} |
| 215 */ | 214 */ |
| 216 get receiveDuration() | |
| 217 { | |
| 218 if (this._endTime === -1 || this._responseReceivedTime === -1) | |
| 219 return -1; | |
| 220 return this._endTime - this._responseReceivedTime; | |
| 221 }, | |
| 222 | |
| 223 /** | |
| 224 * @return {number} | |
| 225 */ | |
| 226 get resourceSize() | 215 get resourceSize() |
| 227 { | 216 { |
| 228 return this._resourceSize || 0; | 217 return this._resourceSize || 0; |
| 229 }, | 218 }, |
| 230 | 219 |
| 231 set resourceSize(x) | 220 set resourceSize(x) |
| 232 { | 221 { |
| 233 this._resourceSize = x; | 222 this._resourceSize = x; |
| 234 }, | 223 }, |
| 235 | 224 |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 */ | 962 */ |
| 974 _pushFrame: function(frameOrError) | 963 _pushFrame: function(frameOrError) |
| 975 { | 964 { |
| 976 if (this._frames.length >= 100) | 965 if (this._frames.length >= 100) |
| 977 this._frames.splice(0, 10); | 966 this._frames.splice(0, 10); |
| 978 this._frames.push(frameOrError); | 967 this._frames.push(frameOrError); |
| 979 }, | 968 }, |
| 980 | 969 |
| 981 __proto__: WebInspector.Object.prototype | 970 __proto__: WebInspector.Object.prototype |
| 982 } | 971 } |
| OLD | NEW |