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

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

Issue 910313004: Replace PlaceholderFrameOwner with RemoteBridgeFrameOwner. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Nit: remove newline Created 5 years, 10 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/WebRemoteFrameImpl.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 #ifndef WebRemoteFrameImpl_h 5 #ifndef WebRemoteFrameImpl_h
6 #define WebRemoteFrameImpl_h 6 #define WebRemoteFrameImpl_h
7 7
8 #include "core/frame/FrameOwner.h" 8 #include "core/frame/FrameOwner.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/web/WebRemoteFrame.h" 10 #include "public/web/WebRemoteFrame.h"
11 #include "public/web/WebRemoteFrameClient.h" 11 #include "public/web/WebRemoteFrameClient.h"
12 #include "web/RemoteFrameClientImpl.h" 12 #include "web/RemoteFrameClientImpl.h"
13 #include "wtf/HashMap.h" 13 #include "wtf/HashMap.h"
14 #include "wtf/OwnPtr.h" 14 #include "wtf/OwnPtr.h"
15 #include "wtf/RefCounted.h" 15 #include "wtf/RefCounted.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class FrameHost; 19 class FrameHost;
20 class FrameOwner; 20 class FrameOwner;
21 class RemoteFrame; 21 class RemoteFrame;
22 22
23 // FIXME: This is just a placeholder frame owner to supply to RemoteFrame when
24 // the parent is also a remote frame. Strictly speaking, this shouldn't be
25 // necessary, since a remote frame shouldn't ever need to communicate with a
26 // remote parent (there are no sandbox flags to retrieve in this case, nor can
27 // the RemoteFrame itself load a document). In most circumstances, the check for
28 // frame->owner() can be replaced with a check for frame->tree().parent(). Once
29 // that's done, this class can be removed.
30 class PlaceholderFrameOwner : public NoBaseWillBeGarbageCollectedFinalized<Place holderFrameOwner>, public FrameOwner {
31 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PlaceholderFrameOwner);
32 public:
33 virtual bool isLocal() const override;
34 virtual SandboxFlags sandboxFlags() const override;
35 virtual void dispatchLoad() override;
36
37 virtual void trace(Visitor*) override;
38 };
39
40 class WebRemoteFrameImpl final : public RefCountedWillBeGarbageCollectedFinalize d<WebRemoteFrameImpl>, public WebRemoteFrame { 23 class WebRemoteFrameImpl final : public RefCountedWillBeGarbageCollectedFinalize d<WebRemoteFrameImpl>, public WebRemoteFrame {
41 public: 24 public:
42 explicit WebRemoteFrameImpl(WebRemoteFrameClient*); 25 explicit WebRemoteFrameImpl(WebRemoteFrameClient*);
43 virtual ~WebRemoteFrameImpl(); 26 virtual ~WebRemoteFrameImpl();
44 27
45 // WebRemoteFrame methods. 28 // WebRemoteFrame methods.
46 virtual bool isWebLocalFrame() const override; 29 virtual bool isWebLocalFrame() const override;
47 virtual WebLocalFrame* toWebLocalFrame() override; 30 virtual WebLocalFrame* toWebLocalFrame() override;
48 virtual bool isWebRemoteFrame() const override; 31 virtual bool isWebRemoteFrame() const override;
49 virtual WebRemoteFrame* toWebRemoteFrame() override; 32 virtual WebRemoteFrame* toWebRemoteFrame() override;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 virtual WebString contentAsText(size_t maxChars) const override; 163 virtual WebString contentAsText(size_t maxChars) const override;
181 virtual WebString contentAsMarkup() const override; 164 virtual WebString contentAsMarkup() const override;
182 virtual WebString layoutTreeAsText(LayoutAsTextControls toShow = LayoutAsTex tNormal) const override; 165 virtual WebString layoutTreeAsText(LayoutAsTextControls toShow = LayoutAsTex tNormal) const override;
183 virtual WebString markerTextForListItem(const WebElement&) const override; 166 virtual WebString markerTextForListItem(const WebElement&) const override;
184 virtual WebRect selectionBoundsRect() const override; 167 virtual WebRect selectionBoundsRect() const override;
185 168
186 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const override; 169 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const override;
187 virtual WebString layerTreeAsText(bool showDebugInfo = false) const override ; 170 virtual WebString layerTreeAsText(bool showDebugInfo = false) const override ;
188 171
189 virtual WebLocalFrame* createLocalChild(const WebString& name, WebSandboxFla gs, WebFrameClient*) override; 172 virtual WebLocalFrame* createLocalChild(const WebString& name, WebSandboxFla gs, WebFrameClient*) override;
173 // FIXME(alexmos): remove once Chrome side is updated to use sandbox flags.
190 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebRemoteFr ameClient*) override; 174 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebRemoteFr ameClient*) override;
175 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebSandboxF lags, WebRemoteFrameClient*) override;
191 176
192 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name); 177 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name);
193 178
194 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>); 179 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>);
195 RemoteFrame* frame() const { return m_frame.get(); } 180 RemoteFrame* frame() const { return m_frame.get(); }
196 181
197 WebRemoteFrameClient* client() const { return m_client; } 182 WebRemoteFrameClient* client() const { return m_client; }
198 183
199 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); 184 static WebRemoteFrameImpl* fromFrame(RemoteFrame&);
200 185
(...skipping 27 matching lines...) Expand all
228 GC_PLUGIN_IGNORE("340522") 213 GC_PLUGIN_IGNORE("340522")
229 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; 214 Persistent<WebRemoteFrameImpl> m_selfKeepAlive;
230 #endif 215 #endif
231 }; 216 };
232 217
233 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame()); 218 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame());
234 219
235 } // namespace blink 220 } // namespace blink
236 221
237 #endif // WebRemoteFrameImpl_h 222 #endif // WebRemoteFrameImpl_h
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/WebRemoteFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698