| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/frame/RemoteFrame.h" | 6 #include "core/frame/RemoteFrame.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/WindowProxy.h" |
| 8 #include "bindings/core/v8/WindowProxyManager.h" | 9 #include "bindings/core/v8/WindowProxyManager.h" |
| 9 #include "core/dom/RemoteSecurityContext.h" | 10 #include "core/dom/RemoteSecurityContext.h" |
| 10 #include "core/frame/RemoteDOMWindow.h" | 11 #include "core/frame/RemoteDOMWindow.h" |
| 11 #include "core/frame/RemoteFrameClient.h" | 12 #include "core/frame/RemoteFrameClient.h" |
| 12 #include "core/frame/RemoteFrameView.h" | 13 #include "core/frame/RemoteFrameView.h" |
| 13 #include "core/html/HTMLFrameOwnerElement.h" | 14 #include "core/html/HTMLFrameOwnerElement.h" |
| 14 #include "platform/weborigin/SecurityPolicy.h" | 15 #include "platform/weborigin/SecurityPolicy.h" |
| 15 | 16 |
| 16 namespace blink { | 17 namespace blink { |
| 17 | 18 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 41 Frame::trace(visitor); | 42 Frame::trace(visitor); |
| 42 } | 43 } |
| 43 | 44 |
| 44 DOMWindow* RemoteFrame::domWindow() const | 45 DOMWindow* RemoteFrame::domWindow() const |
| 45 { | 46 { |
| 46 return m_domWindow.get(); | 47 return m_domWindow.get(); |
| 47 } | 48 } |
| 48 | 49 |
| 49 WindowProxy* RemoteFrame::windowProxy(DOMWrapperWorld& world) | 50 WindowProxy* RemoteFrame::windowProxy(DOMWrapperWorld& world) |
| 50 { | 51 { |
| 51 return m_windowProxyManager->windowProxy(world); | 52 WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); |
| 53 if (windowProxy) |
| 54 windowProxy->initializeIfNeeded(); |
| 55 return windowProxy; |
| 52 } | 56 } |
| 53 | 57 |
| 54 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB
ackForwardList) | 58 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB
ackForwardList) |
| 55 { | 59 { |
| 56 // The process where this frame actually lives won't have sufficient informa
tion to determine | 60 // The process where this frame actually lives won't have sufficient informa
tion to determine |
| 57 // correct referrer, since it won't have access to the originDocument. Set i
t now. | 61 // correct referrer, since it won't have access to the originDocument. Set i
t now. |
| 58 ResourceRequest request(url); | 62 ResourceRequest request(url); |
| 59 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe
rrerPolicy(), url, originDocument.outgoingReferrer())); | 63 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe
rrerPolicy(), url, originDocument.outgoingReferrer())); |
| 60 remoteFrameClient()->navigate(request, lockBackForwardList); | 64 remoteFrameClient()->navigate(request, lockBackForwardList); |
| 61 } | 65 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 owner->setWidget(view); | 106 owner->setWidget(view); |
| 103 } | 107 } |
| 104 } | 108 } |
| 105 | 109 |
| 106 RemoteFrameClient* RemoteFrame::remoteFrameClient() const | 110 RemoteFrameClient* RemoteFrame::remoteFrameClient() const |
| 107 { | 111 { |
| 108 return static_cast<RemoteFrameClient*>(client()); | 112 return static_cast<RemoteFrameClient*>(client()); |
| 109 } | 113 } |
| 110 | 114 |
| 111 } // namespace blink | 115 } // namespace blink |
| OLD | NEW |