| 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 ASSERT_NOT_REACHED(); | 707 ASSERT_NOT_REACHED(); |
| 708 return false; | 708 return false; |
| 709 } | 709 } |
| 710 | 710 |
| 711 WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const | 711 WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const |
| 712 { | 712 { |
| 713 ASSERT_NOT_REACHED(); | 713 ASSERT_NOT_REACHED(); |
| 714 return WebString(); | 714 return WebString(); |
| 715 } | 715 } |
| 716 | 716 |
| 717 // TODO(alexmos): Remove once Chromium side is updated to take previous sibling. |
| 717 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebSa
ndboxFlags sandboxFlags, WebFrameClient* client) | 718 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebSa
ndboxFlags sandboxFlags, WebFrameClient* client) |
| 718 { | 719 { |
| 720 return createLocalChild(name, sandboxFlags, client, lastChild()); |
| 721 } |
| 722 |
| 723 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebSa
ndboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling) |
| 724 { |
| 719 WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(client)
); | 725 WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(client)
); |
| 720 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu
lt = | 726 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu
lt = |
| 721 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, sta
tic_cast<SandboxFlags>(sandboxFlags))); | 727 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, sta
tic_cast<SandboxFlags>(sandboxFlags))); |
| 722 appendChild(child); | 728 insertAfter(child, previousSibling); |
| 723 // FIXME: currently this calls LocalFrame::init() on the created LocalFrame,
which may | 729 // FIXME: currently this calls LocalFrame::init() on the created LocalFrame,
which may |
| 724 // result in the browser observing two navigations to about:blank (one from
the initial | 730 // result in the browser observing two navigations to about:blank (one from
the initial |
| 725 // frame creation, and one from swapping it into the remote process). FrameL
oader might | 731 // frame creation, and one from swapping it into the remote process). FrameL
oader might |
| 726 // need a special initialization function for this case to avoid that duplic
ate navigation. | 732 // need a special initialization function for this case to avoid that duplic
ate navigation. |
| 727 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(),
name, nullAtom); | 733 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(),
name, nullAtom); |
| 728 // Partially related with the above FIXME--the init() call may trigger JS di
spatch. However, | 734 // Partially related with the above FIXME--the init() call may trigger JS di
spatch. However, |
| 729 // if the parent is remote, it should never be detached synchronously... | 735 // if the parent is remote, it should never be detached synchronously... |
| 730 ASSERT(child->frame()); | 736 ASSERT(child->frame()); |
| 731 return child; | 737 return child; |
| 732 } | 738 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 { | 808 { |
| 803 frame()->setIsLoading(false); | 809 frame()->setIsLoading(false); |
| 804 if (parent() && parent()->isWebLocalFrame()) { | 810 if (parent() && parent()->isWebLocalFrame()) { |
| 805 WebLocalFrameImpl* parentFrame = | 811 WebLocalFrameImpl* parentFrame = |
| 806 toWebLocalFrameImpl(parent()->toWebLocalFrame()); | 812 toWebLocalFrameImpl(parent()->toWebLocalFrame()); |
| 807 parentFrame->frame()->loader().checkCompleted(); | 813 parentFrame->frame()->loader().checkCompleted(); |
| 808 } | 814 } |
| 809 } | 815 } |
| 810 | 816 |
| 811 } // namespace blink | 817 } // namespace blink |
| OLD | NEW |