| 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 "core/frame/RemoteFrameClient.h" | 8 #include "core/frame/RemoteFrameClient.h" |
| 9 #include "core/frame/RemoteFrameView.h" | 9 #include "core/frame/RemoteFrameView.h" |
| 10 #include "core/html/HTMLFrameOwnerElement.h" | 10 #include "core/html/HTMLFrameOwnerElement.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 RemoteFrame::~RemoteFrame() | 25 RemoteFrame::~RemoteFrame() |
| 26 { | 26 { |
| 27 setView(nullptr); | 27 setView(nullptr); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB
ackForwardList) | 30 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB
ackForwardList) |
| 31 { | 31 { |
| 32 // The process where this frame actually lives won't have sufficient informa
tion to determine | 32 // The process where this frame actually lives won't have sufficient informa
tion to determine |
| 33 // correct referrer, since it won't have access to the originDocument. Set i
t now. | 33 // correct referrer, since it won't have access to the originDocument. Set i
t now. |
| 34 ResourceRequest request(url); | 34 ResourceRequest request(url); |
| 35 Referrer referrer(SecurityPolicy::generateReferrerHeader(originDocument.refe
rrerPolicy(), url, originDocument.outgoingReferrer()), originDocument.referrerPo
licy()); | 35 request.setHTTPReferrer(SecurityPolicy::generateReferrerHeader(originDocumen
t.referrerPolicy(), url, originDocument.outgoingReferrer())); |
| 36 request.setHTTPReferrer(referrer); | |
| 37 remoteFrameClient()->navigate(request, lockBackForwardList); | 36 remoteFrameClient()->navigate(request, lockBackForwardList); |
| 38 } | 37 } |
| 39 | 38 |
| 40 void RemoteFrame::detach() | 39 void RemoteFrame::detach() |
| 41 { | 40 { |
| 42 detachChildren(); | 41 detachChildren(); |
| 43 m_host = nullptr; | 42 m_host = nullptr; |
| 44 } | 43 } |
| 45 | 44 |
| 46 void RemoteFrame::trace(Visitor* visitor) | 45 void RemoteFrame::trace(Visitor* visitor) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 67 owner->setWidget(view); | 66 owner->setWidget(view); |
| 68 } | 67 } |
| 69 } | 68 } |
| 70 | 69 |
| 71 RemoteFrameClient* RemoteFrame::remoteFrameClient() const | 70 RemoteFrameClient* RemoteFrame::remoteFrameClient() const |
| 72 { | 71 { |
| 73 return static_cast<RemoteFrameClient*>(client()); | 72 return static_cast<RemoteFrameClient*>(client()); |
| 74 } | 73 } |
| 75 | 74 |
| 76 } // namespace blink | 75 } // namespace blink |
| OLD | NEW |