Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Side by Side Diff: Source/web/WebRemoteFrameImpl.cpp

Issue 1157563004: Revert of Update Blink to use the tree scope info on WebFrame for scoping checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "core/page/Page.h" 11 #include "core/page/Page.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 #include "public/platform/WebFloatRect.h" 13 #include "public/platform/WebFloatRect.h"
14 #include "public/platform/WebRect.h" 14 #include "public/platform/WebRect.h"
15 #include "public/web/WebDocument.h" 15 #include "public/web/WebDocument.h"
16 #include "public/web/WebPerformance.h" 16 #include "public/web/WebPerformance.h"
17 #include "public/web/WebRange.h" 17 #include "public/web/WebRange.h"
18 #include "public/web/WebTreeScopeType.h" 18 #include "public/web/WebTreeScopeType.h"
19 #include "web/RemoteBridgeFrameOwner.h" 19 #include "web/RemoteBridgeFrameOwner.h"
20 #include "web/WebViewImpl.h" 20 #include "web/WebViewImpl.h"
21 #include <v8/include/v8.h> 21 #include <v8/include/v8.h>
22 22
23 namespace blink { 23 namespace blink {
24 24
25 WebRemoteFrame* WebRemoteFrame::create(WebRemoteFrameClient* client)
26 {
27 return WebRemoteFrame::create(WebTreeScopeType::Document, client);
28 }
29
25 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, WebRemoteFrameCli ent* client) 30 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, WebRemoteFrameCli ent* client)
26 { 31 {
27 return WebRemoteFrameImpl::create(scope, client); 32 return WebRemoteFrameImpl::create(scope, client);
28 } 33 }
29 34
30 WebRemoteFrame* WebRemoteFrameImpl::create(WebTreeScopeType scope, WebRemoteFram eClient* client) 35 WebRemoteFrame* WebRemoteFrameImpl::create(WebTreeScopeType scope, WebRemoteFram eClient* client)
31 { 36 {
32 WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(scope, client); 37 WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(scope, client);
33 #if ENABLE(OILPAN) 38 #if ENABLE(OILPAN)
34 return frame; 39 return frame;
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 ASSERT_NOT_REACHED(); 711 ASSERT_NOT_REACHED();
707 return false; 712 return false;
708 } 713 }
709 714
710 WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const 715 WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const
711 { 716 {
712 ASSERT_NOT_REACHED(); 717 ASSERT_NOT_REACHED();
713 return WebString(); 718 return WebString();
714 } 719 }
715 720
721 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebSa ndboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling)
722 {
723 return createLocalChild(WebTreeScopeType::Document, name, sandboxFlags, clie nt, previousSibling);
724 }
725
716 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, cons t WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFram e* previousSibling) 726 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, cons t WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFram e* previousSibling)
717 { 727 {
718 WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(scope, client)); 728 WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(scope, client));
719 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt = 729 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt =
720 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, sta tic_cast<SandboxFlags>(sandboxFlags))); 730 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, sta tic_cast<SandboxFlags>(sandboxFlags)));
721 insertAfter(child, previousSibling); 731 insertAfter(child, previousSibling);
722 // FIXME: currently this calls LocalFrame::init() on the created LocalFrame, which may 732 // FIXME: currently this calls LocalFrame::init() on the created LocalFrame, which may
723 // result in the browser observing two navigations to about:blank (one from the initial 733 // result in the browser observing two navigations to about:blank (one from the initial
724 // frame creation, and one from swapping it into the remote process). FrameL oader might 734 // frame creation, and one from swapping it into the remote process). FrameL oader might
725 // need a special initialization function for this case to avoid that duplic ate navigation. 735 // need a special initialization function for this case to avoid that duplic ate navigation.
726 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom); 736 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom);
727 // Partially related with the above FIXME--the init() call may trigger JS di spatch. However, 737 // Partially related with the above FIXME--the init() call may trigger JS di spatch. However,
728 // if the parent is remote, it should never be detached synchronously... 738 // if the parent is remote, it should never be detached synchronously...
729 ASSERT(child->frame()); 739 ASSERT(child->frame());
730 return child; 740 return child;
731 } 741 }
732 742
733 743
734 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name) 744 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name)
735 { 745 {
736 setCoreFrame(RemoteFrame::create(&m_frameClient, host, owner)); 746 setCoreFrame(RemoteFrame::create(&m_frameClient, host, owner));
737 frame()->createView(); 747 frame()->createView();
738 m_frame->tree().setName(name, nullAtom); 748 m_frame->tree().setName(name, nullAtom);
739 } 749 }
740 750
751 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(const WebString& name, Web SandboxFlags sandboxFlags, WebRemoteFrameClient* client)
752 {
753 return createRemoteChild(WebTreeScopeType::Document, name, sandboxFlags, cli ent);
754 }
755
741 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, co nst WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client) 756 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, co nst WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client)
742 { 757 {
743 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scop e, client)); 758 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scop e, client));
744 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt = 759 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt =
745 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, s tatic_cast<SandboxFlags>(sandboxFlags))); 760 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, s tatic_cast<SandboxFlags>(sandboxFlags)));
746 appendChild(child); 761 appendChild(child);
747 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name); 762 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name);
748 return child; 763 return child;
749 } 764 }
750 765
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 : WebRemoteFrame(scope) 827 : WebRemoteFrame(scope)
813 , m_frameClient(this) 828 , m_frameClient(this)
814 , m_client(client) 829 , m_client(client)
815 #if ENABLE(OILPAN) 830 #if ENABLE(OILPAN)
816 , m_selfKeepAlive(this) 831 , m_selfKeepAlive(this)
817 #endif 832 #endif
818 { 833 {
819 } 834 }
820 835
821 } // namespace blink 836 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698