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

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

Issue 1132133009: Plumb whether or not a frame is in shadow DOM to the embedder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments 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/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 class WebRemoteFrameImpl final : public RefCountedWillBeGarbageCollectedFinalize d<WebRemoteFrameImpl>, public WebRemoteFrame { 23 class WebRemoteFrameImpl final : public RefCountedWillBeGarbageCollectedFinalize d<WebRemoteFrameImpl>, public WebRemoteFrame {
24 public: 24 public:
25 explicit WebRemoteFrameImpl(WebRemoteFrameClient*); 25 static WebRemoteFrame* create(WebTreeScopeType, WebRemoteFrameClient*);
26 virtual ~WebRemoteFrameImpl(); 26 virtual ~WebRemoteFrameImpl();
27 27
28 // WebRemoteFrame methods. 28 // WebRemoteFrame methods.
29 virtual bool isWebLocalFrame() const override; 29 virtual bool isWebLocalFrame() const override;
30 virtual WebLocalFrame* toWebLocalFrame() override; 30 virtual WebLocalFrame* toWebLocalFrame() override;
31 virtual bool isWebRemoteFrame() const override; 31 virtual bool isWebRemoteFrame() const override;
32 virtual WebRemoteFrame* toWebRemoteFrame() override; 32 virtual WebRemoteFrame* toWebRemoteFrame() override;
33 virtual void close() override; 33 virtual void close() override;
34 virtual WebString uniqueName() const override; 34 virtual WebString uniqueName() const override;
35 virtual WebString assignedName() const override; 35 virtual WebString assignedName() const override;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 virtual WebString contentAsText(size_t maxChars) const override; 162 virtual WebString contentAsText(size_t maxChars) const override;
163 virtual WebString contentAsMarkup() const override; 163 virtual WebString contentAsMarkup() const override;
164 virtual WebString layoutTreeAsText(LayoutAsTextControls toShow = LayoutAsTex tNormal) const override; 164 virtual WebString layoutTreeAsText(LayoutAsTextControls toShow = LayoutAsTex tNormal) const override;
165 virtual WebString markerTextForListItem(const WebElement&) const override; 165 virtual WebString markerTextForListItem(const WebElement&) const override;
166 virtual WebRect selectionBoundsRect() const override; 166 virtual WebRect selectionBoundsRect() const override;
167 167
168 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const override; 168 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const override;
169 virtual WebString layerTreeAsText(bool showDebugInfo = false) const override ; 169 virtual WebString layerTreeAsText(bool showDebugInfo = false) const override ;
170 170
171 virtual WebLocalFrame* createLocalChild(const WebString& name, WebSandboxFla gs, WebFrameClient*, WebFrame* previousSibling) override; 171 virtual WebLocalFrame* createLocalChild(const WebString& name, WebSandboxFla gs, WebFrameClient*, WebFrame* previousSibling) override;
172 virtual WebLocalFrame* createLocalChild(WebTreeScopeType, const WebString& n ame, WebSandboxFlags, WebFrameClient*, WebFrame* previousSibling) override;
172 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebSandboxF lags, WebRemoteFrameClient*) override; 173 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebSandboxF lags, WebRemoteFrameClient*) override;
174 virtual WebRemoteFrame* createRemoteChild(WebTreeScopeType, const WebString& name, WebSandboxFlags, WebRemoteFrameClient*) override;
173 175
174 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name); 176 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name);
175 177
176 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>); 178 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>);
177 RemoteFrame* frame() const { return m_frame.get(); } 179 RemoteFrame* frame() const { return m_frame.get(); }
178 180
179 WebRemoteFrameClient* client() const { return m_client; } 181 WebRemoteFrameClient* client() const { return m_client; }
180 182
181 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); 183 static WebRemoteFrameImpl* fromFrame(RemoteFrame&);
182 184
183 virtual void initializeFromFrame(WebLocalFrame*) const override; 185 virtual void initializeFromFrame(WebLocalFrame*) const override;
184 186
185 virtual void setReplicatedOrigin(const WebSecurityOrigin&) const override; 187 virtual void setReplicatedOrigin(const WebSecurityOrigin&) const override;
186 virtual void setReplicatedSandboxFlags(WebSandboxFlags) const override; 188 virtual void setReplicatedSandboxFlags(WebSandboxFlags) const override;
187 virtual void setReplicatedName(const WebString&) const override; 189 virtual void setReplicatedName(const WebString&) const override;
188 virtual void DispatchLoadEventForFrameOwner() const override; 190 virtual void DispatchLoadEventForFrameOwner() const override;
189 191
190 void didStartLoading() override; 192 void didStartLoading() override;
191 void didStopLoading() override; 193 void didStopLoading() override;
192 194
193 #if ENABLE(OILPAN) 195 #if ENABLE(OILPAN)
194 DECLARE_TRACE(); 196 DECLARE_TRACE();
195 #endif 197 #endif
196 198
197 private: 199 private:
200 WebRemoteFrameImpl(WebTreeScopeType, WebRemoteFrameClient*);
201
198 RemoteFrameClientImpl m_frameClient; 202 RemoteFrameClientImpl m_frameClient;
199 RefPtrWillBeMember<RemoteFrame> m_frame; 203 RefPtrWillBeMember<RemoteFrame> m_frame;
200 WebRemoteFrameClient* m_client; 204 WebRemoteFrameClient* m_client;
201 205
202 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>> m_ownersForChil dren; 206 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>> m_ownersForChil dren;
203 207
204 #if ENABLE(OILPAN) 208 #if ENABLE(OILPAN)
205 // Oilpan: to provide the guarantee of having the frame live until 209 // Oilpan: to provide the guarantee of having the frame live until
206 // close() is called, an instance keep a self-persistent. It is 210 // close() is called, an instance keep a self-persistent. It is
207 // cleared upon calling close(). This avoids having to assume that 211 // cleared upon calling close(). This avoids having to assume that
208 // an embedder's WebFrame references are all discovered via thread 212 // an embedder's WebFrame references are all discovered via thread
209 // state (stack, registers) should an Oilpan GC strike while we're 213 // state (stack, registers) should an Oilpan GC strike while we're
210 // in the process of detaching. 214 // in the process of detaching.
211 GC_PLUGIN_IGNORE("340522") 215 GC_PLUGIN_IGNORE("340522")
212 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; 216 Persistent<WebRemoteFrameImpl> m_selfKeepAlive;
213 #endif 217 #endif
214 }; 218 };
215 219
216 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame()); 220 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame());
217 221
218 } // namespace blink 222 } // namespace blink
219 223
220 #endif // WebRemoteFrameImpl_h 224 #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