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

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

Issue 643333002: Prepare for remote->local frame swap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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') | public/web/WebFrame.h » ('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/FrameOwner.h"
9 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
10 #include "core/frame/RemoteFrame.h" 9 #include "core/frame/RemoteFrame.h"
11 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
12 #include "core/page/Page.h" 11 #include "core/page/Page.h"
13 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
14 #include "public/platform/WebFloatRect.h" 13 #include "public/platform/WebFloatRect.h"
15 #include "public/platform/WebRect.h" 14 #include "public/platform/WebRect.h"
16 #include "public/web/WebDocument.h" 15 #include "public/web/WebDocument.h"
17 #include "public/web/WebPerformance.h" 16 #include "public/web/WebPerformance.h"
18 #include "public/web/WebRange.h" 17 #include "public/web/WebRange.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 { 68 {
70 // FIXME: Implement. Most likely grab it from m_frame. 69 // FIXME: Implement. Most likely grab it from m_frame.
71 return 0; 70 return 0;
72 } 71 }
73 72
74 void RemoteBridgeFrameOwner::dispatchLoad() 73 void RemoteBridgeFrameOwner::dispatchLoad()
75 { 74 {
76 // FIXME: Implement. Most likely goes through m_frame->client(). 75 // FIXME: Implement. Most likely goes through m_frame->client().
77 } 76 }
78 77
79 // FIXME: This is just a placeholder frame owner to supply to RemoteFrame when 78 } // namespace
80 // the parent is also a remote frame. Strictly speaking, this shouldn't be
81 // necessary, since a remote frame shouldn't ever need to communicate with a
82 // remote parent (there are no sandbox flags to retrieve in this case, nor can
83 // the RemoteFrame itself load a document). In most circumstances, the check for
84 // frame->owner() can be replaced with a check for frame->tree().parent(). Once
85 // that's done, this class can be removed.
86 class PlaceholderFrameOwner : public NoBaseWillBeGarbageCollectedFinalized<Place holderFrameOwner>, public FrameOwner {
87 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PlaceholderFrameOwner);
88 public:
89 virtual bool isLocal() const override;
90 virtual SandboxFlags sandboxFlags() const override;
91 virtual void dispatchLoad() override;
92 };
93 79
94 bool PlaceholderFrameOwner::isLocal() const 80 bool PlaceholderFrameOwner::isLocal() const
95 { 81 {
96 return false; 82 return false;
97 } 83 }
98 84
99 SandboxFlags PlaceholderFrameOwner::sandboxFlags() const 85 SandboxFlags PlaceholderFrameOwner::sandboxFlags() const
100 { 86 {
101 ASSERT_NOT_REACHED();
102 return 0; 87 return 0;
103 } 88 }
104 89
105 void PlaceholderFrameOwner::dispatchLoad() 90 void PlaceholderFrameOwner::dispatchLoad()
106 { 91 {
107 ASSERT_NOT_REACHED();
108 } 92 }
109 93
110 } // namespace
111
112 WebRemoteFrame* WebRemoteFrame::create(WebRemoteFrameClient* client) 94 WebRemoteFrame* WebRemoteFrame::create(WebRemoteFrameClient* client)
113 { 95 {
114 WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(client); 96 WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(client);
115 #if ENABLE(OILPAN) 97 #if ENABLE(OILPAN)
116 return frame; 98 return frame;
117 #else 99 #else
118 return adoptRef(frame).leakRef(); 100 return adoptRef(frame).leakRef();
119 #endif 101 #endif
120 } 102 }
121 103
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const 843 void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const
862 { 844 {
863 ASSERT(source); 845 ASSERT(source);
864 WebLocalFrameImpl* localFrameImpl = toWebLocalFrameImpl(source); 846 WebLocalFrameImpl* localFrameImpl = toWebLocalFrameImpl(source);
865 client()->initializeChildFrame( 847 client()->initializeChildFrame(
866 localFrameImpl->frame()->view()->frameRect(), 848 localFrameImpl->frame()->view()->frameRect(),
867 localFrameImpl->frame()->view()->visibleContentScaleFactor()); 849 localFrameImpl->frame()->view()->visibleContentScaleFactor());
868 } 850 }
869 851
870 } // namespace blink 852 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698