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 #ifndef WebRemoteFrameImpl_h | 5 #ifndef WebRemoteFrameImpl_h |
6 #define WebRemoteFrameImpl_h | 6 #define WebRemoteFrameImpl_h |
7 | 7 |
8 #include "core/frame/RemoteFrame.h" | 8 #include "core/frame/RemoteFrame.h" |
9 #include "platform/heap/SelfKeepAlive.h" | 9 #include "platform/heap/SelfKeepAlive.h" |
10 #include "platform/wtf/Compiler.h" | 10 #include "platform/wtf/Compiler.h" |
11 #include "public/platform/WebInsecureRequestPolicy.h" | 11 #include "public/platform/WebInsecureRequestPolicy.h" |
12 #include "public/web/WebRemoteFrame.h" | 12 #include "public/web/WebRemoteFrame.h" |
13 #include "public/web/WebRemoteFrameClient.h" | 13 #include "public/web/WebRemoteFrameClient.h" |
14 #include "web/RemoteFrameClientImpl.h" | 14 #include "web/RemoteFrameClientImpl.h" |
15 #include "web/WebExport.h" | 15 #include "web/WebExport.h" |
16 #include "web/WebFrameImplBase.h" | |
17 | 16 |
18 namespace blink { | 17 namespace blink { |
19 | 18 |
20 class FrameOwner; | 19 class FrameOwner; |
21 class RemoteFrame; | 20 class RemoteFrame; |
22 enum class WebFrameLoadType; | 21 enum class WebFrameLoadType; |
23 class WebAssociatedURLLoader; | 22 class WebAssociatedURLLoader; |
24 struct WebAssociatedURLLoaderOptions; | 23 struct WebAssociatedURLLoaderOptions; |
25 | 24 |
26 class WEB_EXPORT WebRemoteFrameImpl final | 25 class WEB_EXPORT WebRemoteFrameImpl final |
27 : public WebFrameImplBase, | 26 : public GarbageCollectedFinalized<WebRemoteFrameImpl>, |
28 NON_EXPORTED_BASE(public WebRemoteFrame) { | 27 NON_EXPORTED_BASE(public WebRemoteFrame) { |
29 public: | 28 public: |
30 static WebRemoteFrameImpl* Create(WebTreeScopeType, | 29 static WebRemoteFrameImpl* Create(WebTreeScopeType, |
31 WebRemoteFrameClient*, | 30 WebRemoteFrameClient*, |
32 WebFrame* opener = nullptr); | 31 WebFrame* opener = nullptr); |
33 ~WebRemoteFrameImpl() override; | 32 ~WebRemoteFrameImpl() override; |
34 | 33 |
35 // WebFrame methods: | 34 // WebFrame methods: |
36 void Close() override; | 35 void Close() override; |
37 WebString AssignedName() const override; | 36 WebString AssignedName() const override; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 bool IsPrintScalingDisabledForPlugin(const WebNode&) override; | 97 bool IsPrintScalingDisabledForPlugin(const WebNode&) override; |
99 void PrintPagesWithBoundaries(WebCanvas*, const WebSize&) override; | 98 void PrintPagesWithBoundaries(WebCanvas*, const WebSize&) override; |
100 void DispatchMessageEventWithOriginCheck( | 99 void DispatchMessageEventWithOriginCheck( |
101 const WebSecurityOrigin& intended_target_origin, | 100 const WebSecurityOrigin& intended_target_origin, |
102 const WebDOMEvent&) override; | 101 const WebDOMEvent&) override; |
103 | 102 |
104 WebRect SelectionBoundsRect() const override; | 103 WebRect SelectionBoundsRect() const override; |
105 | 104 |
106 WebString LayerTreeAsText(bool show_debug_info = false) const override; | 105 WebString LayerTreeAsText(bool show_debug_info = false) const override; |
107 | 106 |
108 WebFrameImplBase* ToImplBase() { return this; } | |
109 | |
110 // WebFrameImplBase methods: | |
111 void InitializeCoreFrame(Page&, | |
112 FrameOwner*, | |
113 const AtomicString& name) override; | |
114 RemoteFrame* GetFrame() const override { return frame_.Get(); } | |
115 | |
116 void SetCoreFrame(RemoteFrame*); | |
117 | |
118 WebRemoteFrameClient* Client() const { return client_; } | |
119 | |
120 static WebRemoteFrameImpl* FromFrame(RemoteFrame&); | |
121 | |
122 // WebRemoteFrame methods: | 107 // WebRemoteFrame methods: |
123 WebLocalFrame* CreateLocalChild(WebTreeScopeType, | 108 WebLocalFrame* CreateLocalChild(WebTreeScopeType, |
124 const WebString& name, | 109 const WebString& name, |
125 WebSandboxFlags, | 110 WebSandboxFlags, |
126 WebFrameClient*, | 111 WebFrameClient*, |
127 blink::InterfaceProvider*, | 112 blink::InterfaceProvider*, |
128 blink::InterfaceRegistry*, | 113 blink::InterfaceRegistry*, |
129 WebFrame* previous_sibling, | 114 WebFrame* previous_sibling, |
130 const WebParsedFeaturePolicy&, | 115 const WebParsedFeaturePolicy&, |
131 const WebFrameOwnerProperties&, | 116 const WebFrameOwnerProperties&, |
(...skipping 18 matching lines...) Expand all Loading... |
150 void SetReplicatedInsecureRequestPolicy(WebInsecureRequestPolicy) override; | 135 void SetReplicatedInsecureRequestPolicy(WebInsecureRequestPolicy) override; |
151 void SetReplicatedPotentiallyTrustworthyUniqueOrigin(bool) override; | 136 void SetReplicatedPotentiallyTrustworthyUniqueOrigin(bool) override; |
152 void DispatchLoadEventOnFrameOwner() override; | 137 void DispatchLoadEventOnFrameOwner() override; |
153 void DidStartLoading() override; | 138 void DidStartLoading() override; |
154 void DidStopLoading() override; | 139 void DidStopLoading() override; |
155 bool IsIgnoredForHitTest() const override; | 140 bool IsIgnoredForHitTest() const override; |
156 void WillEnterFullscreen() override; | 141 void WillEnterFullscreen() override; |
157 void SetHasReceivedUserGesture() override; | 142 void SetHasReceivedUserGesture() override; |
158 v8::Local<v8::Object> GlobalProxy() const override; | 143 v8::Local<v8::Object> GlobalProxy() const override; |
159 | 144 |
| 145 void InitializeCoreFrame(Page&, FrameOwner*, const AtomicString& name); |
| 146 RemoteFrame* GetFrame() const { return frame_.Get(); } |
| 147 |
| 148 void SetCoreFrame(RemoteFrame*); |
| 149 |
| 150 WebRemoteFrameClient* Client() const { return client_; } |
| 151 |
| 152 static WebRemoteFrameImpl* FromFrame(RemoteFrame&); |
| 153 |
160 DECLARE_TRACE(); | 154 DECLARE_TRACE(); |
161 | 155 |
162 private: | 156 private: |
163 WebRemoteFrameImpl(WebTreeScopeType, WebRemoteFrameClient*); | 157 WebRemoteFrameImpl(WebTreeScopeType, WebRemoteFrameClient*); |
164 | 158 |
165 // Inherited from WebFrame, but intentionally hidden: it never makes sense | 159 // Inherited from WebFrame, but intentionally hidden: it never makes sense |
166 // to call these on a WebRemoteFrameImpl. | 160 // to call these on a WebRemoteFrameImpl. |
167 bool IsWebLocalFrame() const override; | 161 bool IsWebLocalFrame() const override; |
168 WebLocalFrame* ToWebLocalFrame() override; | 162 WebLocalFrame* ToWebLocalFrame() override; |
169 bool IsWebRemoteFrame() const override; | 163 bool IsWebRemoteFrame() const override; |
(...skipping 11 matching lines...) Expand all Loading... |
181 | 175 |
182 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, | 176 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, |
183 WebFrame, | 177 WebFrame, |
184 frame, | 178 frame, |
185 frame->IsWebRemoteFrame(), | 179 frame->IsWebRemoteFrame(), |
186 frame.IsWebRemoteFrame()); | 180 frame.IsWebRemoteFrame()); |
187 | 181 |
188 } // namespace blink | 182 } // namespace blink |
189 | 183 |
190 #endif // WebRemoteFrameImpl_h | 184 #endif // WebRemoteFrameImpl_h |
OLD | NEW |