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/RemoteFrameView.h" | 9 #include "core/frame/RemoteFrameView.h" |
9 #include "core/html/HTMLFrameOwnerElement.h" | 10 #include "core/html/HTMLFrameOwnerElement.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 inline RemoteFrame::RemoteFrame(FrameClient* client, FrameHost* host, FrameOwner
* owner) | 14 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, FrameHost* host, Fram
eOwner* owner) |
14 : Frame(client, host, owner) | 15 : Frame(client, host, owner) |
15 { | 16 { |
16 } | 17 } |
17 | 18 |
18 PassRefPtrWillBeRawPtr<RemoteFrame> RemoteFrame::create(FrameClient* client, Fra
meHost* host, FrameOwner* owner) | 19 PassRefPtrWillBeRawPtr<RemoteFrame> RemoteFrame::create(RemoteFrameClient* clien
t, FrameHost* host, FrameOwner* owner) |
19 { | 20 { |
20 return adoptRefWillBeNoop(new RemoteFrame(client, host, owner)); | 21 return adoptRefWillBeNoop(new RemoteFrame(client, host, owner)); |
21 } | 22 } |
22 | 23 |
23 RemoteFrame::~RemoteFrame() | 24 RemoteFrame::~RemoteFrame() |
24 { | 25 { |
25 setView(nullptr); | 26 setView(nullptr); |
26 } | 27 } |
27 | 28 |
| 29 void RemoteFrame::navigate(Document&, const KURL& url, const Referrer& referrer,
bool lockBackForwardList) |
| 30 { |
| 31 remoteFrameClient()->navigate(ResourceRequest(url, referrer), lockBackForwar
dList); |
| 32 } |
| 33 |
28 void RemoteFrame::detach() | 34 void RemoteFrame::detach() |
29 { | 35 { |
30 detachChildren(); | 36 detachChildren(); |
31 m_host = nullptr; | 37 m_host = nullptr; |
32 } | 38 } |
33 | 39 |
34 void RemoteFrame::setView(PassRefPtr<RemoteFrameView> view) | 40 void RemoteFrame::setView(PassRefPtr<RemoteFrameView> view) |
35 { | 41 { |
36 m_view = view; | 42 m_view = view; |
37 } | 43 } |
38 | 44 |
39 void RemoteFrame::createView() | 45 void RemoteFrame::createView() |
40 { | 46 { |
41 RefPtr<RemoteFrameView> view = RemoteFrameView::create(this); | 47 RefPtr<RemoteFrameView> view = RemoteFrameView::create(this); |
42 setView(view); | 48 setView(view); |
43 | 49 |
44 if (ownerRenderer()) { | 50 if (ownerRenderer()) { |
45 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); | 51 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); |
46 ASSERT(owner); | 52 ASSERT(owner); |
47 owner->setWidget(view); | 53 owner->setWidget(view); |
48 } | 54 } |
49 } | 55 } |
50 | 56 |
| 57 RemoteFrameClient* RemoteFrame::remoteFrameClient() const |
| 58 { |
| 59 return static_cast<RemoteFrameClient*>(client()); |
| 60 } |
| 61 |
51 } // namespace blink | 62 } // namespace blink |
OLD | NEW |