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 #include "web/WebRemoteFrameImpl.h" | 5 #include "web/WebRemoteFrameImpl.h" |
6 | 6 |
7 #include <v8/include/v8.h> | |
Yuki
2017/02/15 12:04:30
nit: <> => ""
dcheng
2017/02/15 23:14:36
Done.
| |
8 #include "bindings/core/v8/DOMWrapperWorld.h" | |
9 #include "bindings/core/v8/WindowProxy.h" | |
7 #include "core/dom/Fullscreen.h" | 10 #include "core/dom/Fullscreen.h" |
8 #include "core/dom/RemoteSecurityContext.h" | 11 #include "core/dom/RemoteSecurityContext.h" |
9 #include "core/dom/SecurityContext.h" | 12 #include "core/dom/SecurityContext.h" |
10 #include "core/frame/FrameView.h" | 13 #include "core/frame/FrameView.h" |
11 #include "core/frame/Settings.h" | 14 #include "core/frame/Settings.h" |
12 #include "core/frame/csp/ContentSecurityPolicy.h" | 15 #include "core/frame/csp/ContentSecurityPolicy.h" |
13 #include "core/html/HTMLFrameOwnerElement.h" | 16 #include "core/html/HTMLFrameOwnerElement.h" |
14 #include "core/layout/LayoutObject.h" | 17 #include "core/layout/LayoutObject.h" |
15 #include "core/page/Page.h" | 18 #include "core/page/Page.h" |
16 #include "platform/heap/Handle.h" | 19 #include "platform/heap/Handle.h" |
17 #include "public/platform/WebFloatRect.h" | 20 #include "public/platform/WebFloatRect.h" |
18 #include "public/platform/WebRect.h" | 21 #include "public/platform/WebRect.h" |
19 #include "public/web/WebDocument.h" | 22 #include "public/web/WebDocument.h" |
20 #include "public/web/WebFrameOwnerProperties.h" | 23 #include "public/web/WebFrameOwnerProperties.h" |
21 #include "public/web/WebPerformance.h" | 24 #include "public/web/WebPerformance.h" |
22 #include "public/web/WebRange.h" | 25 #include "public/web/WebRange.h" |
23 #include "public/web/WebTreeScopeType.h" | 26 #include "public/web/WebTreeScopeType.h" |
24 #include "web/RemoteFrameOwner.h" | 27 #include "web/RemoteFrameOwner.h" |
25 #include "web/WebLocalFrameImpl.h" | 28 #include "web/WebLocalFrameImpl.h" |
26 #include "web/WebViewImpl.h" | 29 #include "web/WebViewImpl.h" |
27 #include <v8/include/v8.h> | |
28 | 30 |
29 namespace blink { | 31 namespace blink { |
30 | 32 |
31 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, | 33 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, |
32 WebRemoteFrameClient* client, | 34 WebRemoteFrameClient* client, |
33 WebFrame* opener) { | 35 WebFrame* opener) { |
34 return WebRemoteFrameImpl::create(scope, client, opener); | 36 return WebRemoteFrameImpl::create(scope, client, opener); |
35 } | 37 } |
36 | 38 |
37 WebRemoteFrameImpl* WebRemoteFrameImpl::create(WebTreeScopeType scope, | 39 WebRemoteFrameImpl* WebRemoteFrameImpl::create(WebTreeScopeType scope, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 v8::Local<v8::Value> argv[]) { | 207 v8::Local<v8::Value> argv[]) { |
206 NOTREACHED(); | 208 NOTREACHED(); |
207 return v8::Local<v8::Value>(); | 209 return v8::Local<v8::Value>(); |
208 } | 210 } |
209 | 211 |
210 v8::Local<v8::Context> WebRemoteFrameImpl::mainWorldScriptContext() const { | 212 v8::Local<v8::Context> WebRemoteFrameImpl::mainWorldScriptContext() const { |
211 NOTREACHED(); | 213 NOTREACHED(); |
212 return v8::Local<v8::Context>(); | 214 return v8::Local<v8::Context>(); |
213 } | 215 } |
214 | 216 |
215 v8::Local<v8::Context> WebRemoteFrameImpl::deprecatedMainWorldScriptContext() | |
216 const { | |
217 return toV8Context(frame(), DOMWrapperWorld::mainWorld()); | |
218 } | |
219 | |
220 void WebRemoteFrameImpl::reload(WebFrameLoadType) { | 217 void WebRemoteFrameImpl::reload(WebFrameLoadType) { |
221 NOTREACHED(); | 218 NOTREACHED(); |
222 } | 219 } |
223 | 220 |
224 void WebRemoteFrameImpl::reloadWithOverrideURL(const WebURL& overrideUrl, | 221 void WebRemoteFrameImpl::reloadWithOverrideURL(const WebURL& overrideUrl, |
225 WebFrameLoadType) { | 222 WebFrameLoadType) { |
226 NOTREACHED(); | 223 NOTREACHED(); |
227 } | 224 } |
228 | 225 |
229 void WebRemoteFrameImpl::loadRequest(const WebURLRequest&) { | 226 void WebRemoteFrameImpl::loadRequest(const WebURLRequest&) { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
523 // (prefixed or unprefixed) to use for firing fullscreen events. | 520 // (prefixed or unprefixed) to use for firing fullscreen events. |
524 Fullscreen::requestFullscreen(*ownerElement, | 521 Fullscreen::requestFullscreen(*ownerElement, |
525 Fullscreen::RequestType::Prefixed, | 522 Fullscreen::RequestType::Prefixed, |
526 true /* forCrossProcessAncestor */); | 523 true /* forCrossProcessAncestor */); |
527 } | 524 } |
528 | 525 |
529 void WebRemoteFrameImpl::setHasReceivedUserGesture() { | 526 void WebRemoteFrameImpl::setHasReceivedUserGesture() { |
530 frame()->setDocumentHasReceivedUserGesture(); | 527 frame()->setDocumentHasReceivedUserGesture(); |
531 } | 528 } |
532 | 529 |
530 v8::Local<v8::Object> WebRemoteFrameImpl::globalProxy() const { | |
531 return frame() | |
532 ->windowProxy(DOMWrapperWorld::mainWorld()) | |
533 ->globalIfNotDetached(); | |
534 } | |
535 | |
533 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, | 536 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, |
534 WebRemoteFrameClient* client) | 537 WebRemoteFrameClient* client) |
535 : WebRemoteFrame(scope), | 538 : WebRemoteFrame(scope), |
536 m_frameClient(RemoteFrameClientImpl::create(this)), | 539 m_frameClient(RemoteFrameClientImpl::create(this)), |
537 m_client(client), | 540 m_client(client), |
538 m_selfKeepAlive(this) {} | 541 m_selfKeepAlive(this) {} |
539 | 542 |
540 } // namespace blink | 543 } // namespace blink |
OLD | NEW |