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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 this.mainFrame = null; | 57 this.mainFrame = null; |
58 | 58 |
59 this._agent.getResourceTree().then(this._processCachedResources.bind(this)); | 59 this._agent.getResourceTree().then(this._processCachedResources.bind(this)); |
60 } | 60 } |
61 | 61 |
62 /** | 62 /** |
63 * @param {!SDK.NetworkRequest} request | 63 * @param {!SDK.NetworkRequest} request |
64 * @return {?SDK.ResourceTreeFrame} | 64 * @return {?SDK.ResourceTreeFrame} |
65 */ | 65 */ |
66 static frameForRequest(request) { | 66 static frameForRequest(request) { |
67 var resourceTreeModel = request.networkManager().target().model(SDK.Resource
TreeModel); | 67 var networkManager = SDK.NetworkManager.forRequest(request); |
| 68 var resourceTreeModel = networkManager ? networkManager.target().model(SDK.R
esourceTreeModel) : null; |
68 if (!resourceTreeModel) | 69 if (!resourceTreeModel) |
69 return null; | 70 return null; |
70 return resourceTreeModel.frameForId(request.frameId); | 71 return resourceTreeModel.frameForId(request.frameId); |
71 } | 72 } |
72 | 73 |
73 /** | 74 /** |
74 * @return {!Array.<!SDK.ResourceTreeFrame>} | 75 * @return {!Array.<!SDK.ResourceTreeFrame>} |
75 */ | 76 */ |
76 static frames() { | 77 static frames() { |
77 var result = []; | 78 var result = []; |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.InterstitialHidden); | 878 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.InterstitialHidden); |
878 } | 879 } |
879 | 880 |
880 /** | 881 /** |
881 * @override | 882 * @override |
882 */ | 883 */ |
883 navigationRequested() { | 884 navigationRequested() { |
884 // Frontend is not interested in when navigations are requested. | 885 // Frontend is not interested in when navigations are requested. |
885 } | 886 } |
886 }; | 887 }; |
OLD | NEW |