Chromium Code Reviews| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 // Simulate missed "frameAttached" for a main frame navigation to the new backend process. | 190 // Simulate missed "frameAttached" for a main frame navigation to the new backend process. |
| 191 console.assert(!framePayload.parentId, 'Main frame shouldn\'t have parent frame id.'); | 191 console.assert(!framePayload.parentId, 'Main frame shouldn\'t have parent frame id.'); |
| 192 frame = this._frameAttached(framePayload.id, framePayload.parentId || ''); | 192 frame = this._frameAttached(framePayload.id, framePayload.parentId || ''); |
| 193 console.assert(frame); | 193 console.assert(frame); |
| 194 } | 194 } |
| 195 | 195 |
| 196 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.FrameWillNavigate , frame); | 196 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.FrameWillNavigate , frame); |
| 197 | 197 |
| 198 this._securityOriginManager.removeSecurityOrigin(frame.securityOrigin); | 198 this._securityOriginManager.removeSecurityOrigin(frame.securityOrigin); |
| 199 frame._navigate(framePayload); | 199 frame._navigate(framePayload); |
| 200 var addedOrigin = frame.securityOrigin; | 200 var addedOrigin = framePayload.securityOrigin; |
| 201 | 201 |
| 202 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.FrameNavigated, f rame); | 202 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.FrameNavigated, f rame); |
| 203 if (addedOrigin) | |
| 204 this._securityOriginManager.addSecurityOrigin(addedOrigin); | |
| 203 if (frame.isMainFrame()) { | 205 if (frame.isMainFrame()) { |
| 206 this._securityOriginManager.setMainSecurityOrigin(frame.url); | |
|
pfeldman
2017/01/06 18:45:19
You are setting url in place of security origin.
eostroukhov
2017/01/06 19:28:24
Done.
| |
| 204 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.MainFrameNaviga ted, frame); | 207 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.MainFrameNaviga ted, frame); |
| 205 if (Common.moduleSetting('preserveConsoleLog').get()) | 208 if (Common.moduleSetting('preserveConsoleLog').get()) |
| 206 Common.console.log(Common.UIString('Navigated to %s', frame.url)); | 209 Common.console.log(Common.UIString('Navigated to %s', frame.url)); |
| 207 } | 210 } |
| 208 if (addedOrigin) | |
| 209 this._securityOriginManager.addSecurityOrigin(addedOrigin); | |
| 210 | 211 |
| 211 // Fill frame with retained resources (the ones loaded using new loader). | 212 // Fill frame with retained resources (the ones loaded using new loader). |
| 212 var resources = frame.resources(); | 213 var resources = frame.resources(); |
| 213 for (var i = 0; i < resources.length; ++i) | 214 for (var i = 0; i < resources.length; ++i) |
| 214 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.ResourceAdded, resources[i]); | 215 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.ResourceAdded, resources[i]); |
| 215 | 216 |
| 216 if (frame.isMainFrame()) | 217 if (frame.isMainFrame()) |
| 217 this.target().setInspectedURL(frame.url); | 218 this.target().setInspectedURL(frame.url); |
| 218 } | 219 } |
| 219 | 220 |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 893 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden); | 894 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden); |
| 894 } | 895 } |
| 895 | 896 |
| 896 /** | 897 /** |
| 897 * @override | 898 * @override |
| 898 */ | 899 */ |
| 899 navigationRequested() { | 900 navigationRequested() { |
| 900 // Frontend is not interested in when navigations are requested. | 901 // Frontend is not interested in when navigations are requested. |
| 901 } | 902 } |
| 902 }; | 903 }; |
| OLD | NEW |