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 21 matching lines...) Expand all Loading... |
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 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe
rrerPolicy(), url, originDocument.outgoingReferrer())); | 35 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe
rrerPolicy(), url, originDocument.outgoingReferrer())); |
36 remoteFrameClient()->navigate(request, lockBackForwardList); | 36 remoteFrameClient()->navigate(request, lockBackForwardList); |
37 } | 37 } |
38 | 38 |
39 void RemoteFrame::detach() | 39 void RemoteFrame::detach() |
40 { | 40 { |
41 detachChildren(); | 41 detachChildren(); |
| 42 if (!client()) |
| 43 return; |
42 Frame::detach(); | 44 Frame::detach(); |
43 } | 45 } |
44 | 46 |
45 void RemoteFrame::forwardInputEvent(Event* event) | 47 void RemoteFrame::forwardInputEvent(Event* event) |
46 { | 48 { |
47 remoteFrameClient()->forwardInputEvent(event); | 49 remoteFrameClient()->forwardInputEvent(event); |
48 } | 50 } |
49 | 51 |
50 void RemoteFrame::trace(Visitor* visitor) | 52 void RemoteFrame::trace(Visitor* visitor) |
51 { | 53 { |
(...skipping 19 matching lines...) Expand all Loading... |
71 owner->setWidget(view); | 73 owner->setWidget(view); |
72 } | 74 } |
73 } | 75 } |
74 | 76 |
75 RemoteFrameClient* RemoteFrame::remoteFrameClient() const | 77 RemoteFrameClient* RemoteFrame::remoteFrameClient() const |
76 { | 78 { |
77 return static_cast<RemoteFrameClient*>(client()); | 79 return static_cast<RemoteFrameClient*>(client()); |
78 } | 80 } |
79 | 81 |
80 } // namespace blink | 82 } // namespace blink |
OLD | NEW |