| 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/FrameView.h" | 8 #include "core/frame/FrameView.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 26 matching lines...) Expand all Loading... |
| 37 #endif | 37 #endif |
| 38 } | 38 } |
| 39 | 39 |
| 40 WebRemoteFrameImpl::~WebRemoteFrameImpl() | 40 WebRemoteFrameImpl::~WebRemoteFrameImpl() |
| 41 { | 41 { |
| 42 } | 42 } |
| 43 | 43 |
| 44 #if ENABLE(OILPAN) | 44 #if ENABLE(OILPAN) |
| 45 DEFINE_TRACE(WebRemoteFrameImpl) | 45 DEFINE_TRACE(WebRemoteFrameImpl) |
| 46 { | 46 { |
| 47 visitor->trace(m_frameClient); |
| 47 visitor->trace(m_frame); | 48 visitor->trace(m_frame); |
| 48 visitor->trace(m_ownersForChildren); | 49 visitor->trace(m_ownersForChildren); |
| 49 visitor->template registerWeakMembers<WebFrame, &WebFrame::clearWeakFrames>(
this); | 50 visitor->template registerWeakMembers<WebFrame, &WebFrame::clearWeakFrames>(
this); |
| 50 WebFrame::traceFrames(visitor, this); | 51 WebFrame::traceFrames(visitor, this); |
| 51 } | 52 } |
| 52 #endif | 53 #endif |
| 53 | 54 |
| 54 bool WebRemoteFrameImpl::isWebLocalFrame() const | 55 bool WebRemoteFrameImpl::isWebLocalFrame() const |
| 55 { | 56 { |
| 56 return false; | 57 return false; |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(),
name, nullAtom); | 716 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(),
name, nullAtom); |
| 716 // Partially related with the above FIXME--the init() call may trigger JS di
spatch. However, | 717 // Partially related with the above FIXME--the init() call may trigger JS di
spatch. However, |
| 717 // if the parent is remote, it should never be detached synchronously... | 718 // if the parent is remote, it should never be detached synchronously... |
| 718 ASSERT(child->frame()); | 719 ASSERT(child->frame()); |
| 719 return child; | 720 return child; |
| 720 } | 721 } |
| 721 | 722 |
| 722 | 723 |
| 723 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner,
const AtomicString& name) | 724 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner,
const AtomicString& name) |
| 724 { | 725 { |
| 725 setCoreFrame(RemoteFrame::create(&m_frameClient, host, owner)); | 726 setCoreFrame(RemoteFrame::create(m_frameClient.get(), host, owner)); |
| 726 frame()->createView(); | 727 frame()->createView(); |
| 727 m_frame->tree().setName(name, nullAtom); | 728 m_frame->tree().setName(name, nullAtom); |
| 728 } | 729 } |
| 729 | 730 |
| 730 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, co
nst WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client) | 731 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, co
nst WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client) |
| 731 { | 732 { |
| 732 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scop
e, client)); | 733 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scop
e, client)); |
| 733 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu
lt = | 734 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu
lt = |
| 734 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, s
tatic_cast<SandboxFlags>(sandboxFlags))); | 735 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, s
tatic_cast<SandboxFlags>(sandboxFlags))); |
| 735 appendChild(child); | 736 appendChild(child); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 frame()->setIsLoading(false); | 797 frame()->setIsLoading(false); |
| 797 if (parent() && parent()->isWebLocalFrame()) { | 798 if (parent() && parent()->isWebLocalFrame()) { |
| 798 WebLocalFrameImpl* parentFrame = | 799 WebLocalFrameImpl* parentFrame = |
| 799 toWebLocalFrameImpl(parent()->toWebLocalFrame()); | 800 toWebLocalFrameImpl(parent()->toWebLocalFrame()); |
| 800 parentFrame->frame()->loader().checkCompleted(); | 801 parentFrame->frame()->loader().checkCompleted(); |
| 801 } | 802 } |
| 802 } | 803 } |
| 803 | 804 |
| 804 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli
ent* client) | 805 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli
ent* client) |
| 805 : WebRemoteFrame(scope) | 806 : WebRemoteFrame(scope) |
| 806 , m_frameClient(this) | 807 , m_frameClient(RemoteFrameClientImpl::create(this)) |
| 807 , m_client(client) | 808 , m_client(client) |
| 808 #if ENABLE(OILPAN) | 809 #if ENABLE(OILPAN) |
| 809 , m_selfKeepAlive(this) | 810 , m_selfKeepAlive(this) |
| 810 #endif | 811 #endif |
| 811 { | 812 { |
| 812 } | 813 } |
| 813 | 814 |
| 814 } // namespace blink | 815 } // namespace blink |
| OLD | NEW |