| 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 "web/WebRemoteFrameImpl.h" | 6 #include "web/WebRemoteFrameImpl.h" |
| 7 | 7 |
| 8 #include "core/frame/FrameOwner.h" | 8 #include "core/frame/FrameOwner.h" |
| 9 #include "core/frame/RemoteFrame.h" | 9 #include "core/frame/RemoteFrame.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 return 0; | 85 return 0; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void PlaceholderFrameOwner::dispatchLoad() | 88 void PlaceholderFrameOwner::dispatchLoad() |
| 89 { | 89 { |
| 90 ASSERT_NOT_REACHED(); | 90 ASSERT_NOT_REACHED(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace | 93 } // namespace |
| 94 | 94 |
| 95 WebRemoteFrame* WebRemoteFrame::create(WebFrameClient*) | 95 WebRemoteFrame* WebRemoteFrame::create(WebRemoteFrameClient* client) |
| 96 { | 96 { |
| 97 return adoptRef(new WebRemoteFrameImpl()).leakRef(); | 97 return adoptRef(new WebRemoteFrameImpl(client)).leakRef(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 WebRemoteFrameImpl::WebRemoteFrameImpl() | 100 WebRemoteFrameImpl::WebRemoteFrameImpl(WebRemoteFrameClient* client) |
| 101 : m_frameClient(this) | 101 : m_frameClient(this) |
| 102 , m_client(client) |
| 102 { | 103 { |
| 103 } | 104 } |
| 104 | 105 |
| 105 WebRemoteFrameImpl::~WebRemoteFrameImpl() | 106 WebRemoteFrameImpl::~WebRemoteFrameImpl() |
| 106 { | 107 { |
| 107 } | 108 } |
| 108 | 109 |
| 109 bool WebRemoteFrameImpl::isWebLocalFrame() const | 110 bool WebRemoteFrameImpl::isWebLocalFrame() const |
| 110 { | 111 { |
| 111 return false; | 112 return false; |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 ASSERT(child->frame()); | 805 ASSERT(child->frame()); |
| 805 return child; | 806 return child; |
| 806 } | 807 } |
| 807 | 808 |
| 808 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner,
const AtomicString& name) | 809 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner,
const AtomicString& name) |
| 809 { | 810 { |
| 810 setCoreFrame(RemoteFrame::create(&m_frameClient, host, owner)); | 811 setCoreFrame(RemoteFrame::create(&m_frameClient, host, owner)); |
| 811 m_frame->tree().setName(name, nullAtom); | 812 m_frame->tree().setName(name, nullAtom); |
| 812 } | 813 } |
| 813 | 814 |
| 814 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(const WebString& name, Web
FrameClient* client) | 815 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(const WebString& name, Web
RemoteFrameClient* client) |
| 815 { | 816 { |
| 816 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(clie
nt)); | 817 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(clie
nt)); |
| 817 HashMap<WebFrame*, OwnPtr<FrameOwner> >::AddResult result = | 818 HashMap<WebFrame*, OwnPtr<FrameOwner> >::AddResult result = |
| 818 m_ownersForChildren.add(child, adoptPtr(new PlaceholderFrameOwner)); | 819 m_ownersForChildren.add(child, adoptPtr(new PlaceholderFrameOwner)); |
| 819 appendChild(child); | 820 appendChild(child); |
| 820 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(),
name); | 821 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(),
name); |
| 821 return child; | 822 return child; |
| 822 } | 823 } |
| 823 | 824 |
| 824 void WebRemoteFrameImpl::setCoreFrame(PassRefPtr<RemoteFrame> frame) | 825 void WebRemoteFrameImpl::setCoreFrame(PassRefPtr<RemoteFrame> frame) |
| 825 { | 826 { |
| 826 m_frame = frame; | 827 m_frame = frame; |
| 827 } | 828 } |
| 828 | 829 |
| 829 WebRemoteFrameImpl* WebRemoteFrameImpl::fromFrame(RemoteFrame& frame) | 830 WebRemoteFrameImpl* WebRemoteFrameImpl::fromFrame(RemoteFrame& frame) |
| 830 { | 831 { |
| 831 if (!frame.client()) | 832 if (!frame.client()) |
| 832 return 0; | 833 return 0; |
| 833 return static_cast<RemoteFrameClient*>(frame.client())->webFrame(); | 834 return static_cast<RemoteFrameClient*>(frame.client())->webFrame(); |
| 834 } | 835 } |
| 835 | 836 |
| 836 } // namespace blink | 837 } // namespace blink |
| 837 | 838 |
| OLD | NEW |