| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 /** | 286 /** |
| 287 * @param {!WebInspector.Event} event | 287 * @param {!WebInspector.Event} event |
| 288 */ | 288 */ |
| 289 _onRequestFinished: function(event) | 289 _onRequestFinished: function(event) |
| 290 { | 290 { |
| 291 if (!this._cachedResourcesProcessed) | 291 if (!this._cachedResourcesProcessed) |
| 292 return; | 292 return; |
| 293 | 293 |
| 294 var request = /** @type {!WebInspector.NetworkRequest} */ (event.data); | 294 var request = /** @type {!WebInspector.NetworkRequest} */ (event.data); |
| 295 if (request.failed || request.type === WebInspector.resourceTypes.XHR) | 295 if (request.failed || request.resourceType() === WebInspector.resourceTy
pes.XHR) |
| 296 return; | 296 return; |
| 297 | 297 |
| 298 var frame = this._frames[request.frameId]; | 298 var frame = this._frames[request.frameId]; |
| 299 if (frame) { | 299 if (frame) { |
| 300 var resource = frame._addRequest(request); | 300 var resource = frame._addRequest(request); |
| 301 this._addPendingConsoleMessagesToResource(resource); | 301 this._addPendingConsoleMessagesToResource(resource); |
| 302 } | 302 } |
| 303 }, | 303 }, |
| 304 | 304 |
| 305 /** | 305 /** |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 * @param {!WebInspector.NetworkRequest} request | 657 * @param {!WebInspector.NetworkRequest} request |
| 658 * @return {!WebInspector.Resource} | 658 * @return {!WebInspector.Resource} |
| 659 */ | 659 */ |
| 660 _addRequest: function(request) | 660 _addRequest: function(request) |
| 661 { | 661 { |
| 662 var resource = this._resourcesMap[request.url]; | 662 var resource = this._resourcesMap[request.url]; |
| 663 if (resource && resource.request === request) { | 663 if (resource && resource.request === request) { |
| 664 // Already in the tree, we just got an extra update. | 664 // Already in the tree, we just got an extra update. |
| 665 return resource; | 665 return resource; |
| 666 } | 666 } |
| 667 resource = new WebInspector.Resource(this.target(), request, request.url
, request.documentURL, request.frameId, request.loaderId, request.type, request.
mimeType); | 667 resource = new WebInspector.Resource(this.target(), request, request.url
, request.documentURL, request.frameId, request.loaderId, request.resourceType()
, request.mimeType); |
| 668 this._resourcesMap[resource.url] = resource; | 668 this._resourcesMap[resource.url] = resource; |
| 669 this._model.dispatchEventToListeners(WebInspector.ResourceTreeModel.Even
tTypes.ResourceAdded, resource); | 669 this._model.dispatchEventToListeners(WebInspector.ResourceTreeModel.Even
tTypes.ResourceAdded, resource); |
| 670 return resource; | 670 return resource; |
| 671 }, | 671 }, |
| 672 | 672 |
| 673 /** | 673 /** |
| 674 * @return {!Array.<!WebInspector.Resource>} | 674 * @return {!Array.<!WebInspector.Resource>} |
| 675 */ | 675 */ |
| 676 resources: function() | 676 resources: function() |
| 677 { | 677 { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 interstitialHidden: function() | 852 interstitialHidden: function() |
| 853 { | 853 { |
| 854 // Frontend is not interested in interstitials. | 854 // Frontend is not interested in interstitials. |
| 855 } | 855 } |
| 856 } | 856 } |
| 857 | 857 |
| 858 /** | 858 /** |
| 859 * @type {!WebInspector.ResourceTreeModel} | 859 * @type {!WebInspector.ResourceTreeModel} |
| 860 */ | 860 */ |
| 861 WebInspector.resourceTreeModel; | 861 WebInspector.resourceTreeModel; |
| OLD | NEW |