| 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 PassRefPtr<RemoteFrame> RemoteFrame::create(FrameClient* client, FrameHost* host
, FrameOwner* owner) | 19 PassRefPtr<RemoteFrame> RemoteFrame::create(RemoteFrameClient* client, FrameHost
* host, FrameOwner* owner) |
| 19 { | 20 { |
| 20 RefPtr<RemoteFrame> frame = adoptRef(new RemoteFrame(client, host, owner)); | 21 RefPtr<RemoteFrame> frame = adoptRef(new RemoteFrame(client, host, owner)); |
| 21 return frame.release(); | 22 return frame.release(); |
| 22 } | 23 } |
| 23 | 24 |
| 24 RemoteFrame::~RemoteFrame() | 25 RemoteFrame::~RemoteFrame() |
| 25 { | 26 { |
| 26 setView(nullptr); | 27 setView(nullptr); |
| 27 } | 28 } |
| 28 | 29 |
| 30 void RemoteFrame::navigate(Document&, const KURL& url, const Referrer& referrer,
bool lockBackForwardList) |
| 31 { |
| 32 remoteFrameClient()->navigate(ResourceRequest(url, referrer), lockBackForwar
dList); |
| 33 } |
| 34 |
| 29 void RemoteFrame::detach() | 35 void RemoteFrame::detach() |
| 30 { | 36 { |
| 31 detachChildren(); | 37 detachChildren(); |
| 32 m_host = 0; | 38 m_host = 0; |
| 33 } | 39 } |
| 34 | 40 |
| 35 void RemoteFrame::setView(PassRefPtr<RemoteFrameView> view) | 41 void RemoteFrame::setView(PassRefPtr<RemoteFrameView> view) |
| 36 { | 42 { |
| 37 m_view = view; | 43 m_view = view; |
| 38 } | 44 } |
| 39 | 45 |
| 40 void RemoteFrame::createView() | 46 void RemoteFrame::createView() |
| 41 { | 47 { |
| 42 RefPtr<RemoteFrameView> view = RemoteFrameView::create(this); | 48 RefPtr<RemoteFrameView> view = RemoteFrameView::create(this); |
| 43 setView(view); | 49 setView(view); |
| 44 | 50 |
| 45 if (ownerRenderer()) { | 51 if (ownerRenderer()) { |
| 46 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); | 52 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); |
| 47 ASSERT(owner); | 53 ASSERT(owner); |
| 48 owner->setWidget(view); | 54 owner->setWidget(view); |
| 49 } | 55 } |
| 50 } | 56 } |
| 51 | 57 |
| 58 RemoteFrameClient* RemoteFrame::remoteFrameClient() const |
| 59 { |
| 60 return static_cast<RemoteFrameClient*>(client()); |
| 61 } |
| 62 |
| 52 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |