OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 }, | 528 }, |
529 | 529 |
530 didCommitLoadForFrame: function(frame, loader) | 530 didCommitLoadForFrame: function(frame, loader) |
531 { | 531 { |
532 // frame.parentId === 0 is when main frame navigation happens. | 532 // frame.parentId === 0 is when main frame navigation happens. |
533 this._clearChildFramesAndResources(frame.parentId ? frame.id : 0, loader
.loaderId); | 533 this._clearChildFramesAndResources(frame.parentId ? frame.id : 0, loader
.loaderId); |
534 | 534 |
535 this.addOrUpdateFrame(frame); | 535 this.addOrUpdateFrame(frame); |
536 | 536 |
537 var resourcesForFrame = this._resourcesByFrameId[frame.id]; | 537 var resourcesForFrame = this._resourcesByFrameId[frame.id]; |
538 for (var i = 0; resourcesForFrame && i < resourcesForFrame.length; ++i)
{ | 538 for (var i = 0; resourcesForFrame && i < resourcesForFrame.length; ++i) |
539 WebInspector.resourceManager._bindResourceURL(resourcesForFrame[i]); | |
540 WebInspector.panels.resources.addResourceToFrame(frame.id, resources
ForFrame[i]); | 539 WebInspector.panels.resources.addResourceToFrame(frame.id, resources
ForFrame[i]); |
541 } | |
542 }, | 540 }, |
543 | 541 |
544 frameDetachedFromParent: function(frameId) | 542 frameDetachedFromParent: function(frameId) |
545 { | 543 { |
546 this._clearChildFramesAndResources(frameId, 0); | 544 this._clearChildFramesAndResources(frameId, 0); |
547 WebInspector.panels.resources.removeFrame(frameId); | 545 WebInspector.panels.resources.removeFrame(frameId); |
548 }, | 546 }, |
549 | 547 |
550 _clearChildFramesAndResources: function(frameId, loaderId) | 548 _clearChildFramesAndResources: function(frameId, loaderId) |
551 { | 549 { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 var frames = this._subframes[frameId]; | 610 var frames = this._subframes[frameId]; |
613 if (frames) { | 611 if (frames) { |
614 for (var id in frames) { | 612 for (var id in frames) { |
615 if (this._callForFrameResources(id, callback)) | 613 if (this._callForFrameResources(id, callback)) |
616 return true; | 614 return true; |
617 } | 615 } |
618 } | 616 } |
619 return false; | 617 return false; |
620 } | 618 } |
621 } | 619 } |
OLD | NEW |