| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/RemoteFrame.h" | 5 #include "core/frame/RemoteFrame.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/WindowProxy.h" | 7 #include "bindings/core/v8/WindowProxy.h" |
| 8 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
| 9 #include "core/dom/RemoteSecurityContext.h" | 9 #include "core/dom/RemoteSecurityContext.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); | 59 WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); |
| 60 ASSERT(windowProxy); | 60 ASSERT(windowProxy); |
| 61 windowProxy->initializeIfNeeded(); | 61 windowProxy->initializeIfNeeded(); |
| 62 return windowProxy; | 62 return windowProxy; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void RemoteFrame::navigate(Document& originDocument, | 65 void RemoteFrame::navigate(Document& originDocument, |
| 66 const KURL& url, | 66 const KURL& url, |
| 67 bool replaceCurrentItem, | 67 bool replaceCurrentItem, |
| 68 UserGestureStatus userGestureStatus) { | 68 UserGestureStatus userGestureStatus) { |
| 69 FrameLoadRequest frameRequest(&originDocument, url); | 69 KURL upgradedURL(url); |
| 70 upgradeInsecureRequest(upgradedURL, originDocument); |
| 71 |
| 72 FrameLoadRequest frameRequest(&originDocument, upgradedURL); |
| 70 frameRequest.setReplacesCurrentItem(replaceCurrentItem); | 73 frameRequest.setReplacesCurrentItem(replaceCurrentItem); |
| 71 frameRequest.resourceRequest().setHasUserGesture(userGestureStatus == | 74 frameRequest.resourceRequest().setHasUserGesture(userGestureStatus == |
| 72 UserGestureStatus::Active); | 75 UserGestureStatus::Active); |
| 73 navigate(frameRequest); | 76 navigate(frameRequest); |
| 74 } | 77 } |
| 75 | 78 |
| 76 void RemoteFrame::navigate(const FrameLoadRequest& passedRequest) { | 79 void RemoteFrame::navigate(const FrameLoadRequest& passedRequest) { |
| 77 FrameLoadRequest frameRequest(passedRequest); | 80 FrameLoadRequest frameRequest(passedRequest); |
| 78 | 81 |
| 79 // The process where this frame actually lives won't have sufficient | 82 // The process where this frame actually lives won't have sufficient |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 FrameVector childrenToDetach; | 199 FrameVector childrenToDetach; |
| 197 childrenToDetach.reserveCapacity(tree().childCount()); | 200 childrenToDetach.reserveCapacity(tree().childCount()); |
| 198 for (Frame* child = tree().firstChild(); child; | 201 for (Frame* child = tree().firstChild(); child; |
| 199 child = child->tree().nextSibling()) | 202 child = child->tree().nextSibling()) |
| 200 childrenToDetach.append(child); | 203 childrenToDetach.append(child); |
| 201 for (const auto& child : childrenToDetach) | 204 for (const auto& child : childrenToDetach) |
| 202 child->detach(FrameDetachType::Remove); | 205 child->detach(FrameDetachType::Remove); |
| 203 } | 206 } |
| 204 | 207 |
| 205 } // namespace blink | 208 } // namespace blink |
| OLD | NEW |