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

Unified Diff: Source/web/WebRemoteFrameImpl.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebRemoteFrameImpl.cpp
diff --git a/Source/web/WebRemoteFrameImpl.cpp b/Source/web/WebRemoteFrameImpl.cpp
index 1a026751f3e1b38bbcc738c23c6d432b10e51ab5..030c9941ebe56453c28da1196434ee071deb3cf0 100644
--- a/Source/web/WebRemoteFrameImpl.cpp
+++ b/Source/web/WebRemoteFrameImpl.cpp
@@ -15,6 +15,7 @@
#include "public/web/WebDocument.h"
#include "public/web/WebPerformance.h"
#include "public/web/WebRange.h"
+#include "public/web/WebTreeScopeType.h"
#include "web/RemoteBridgeFrameOwner.h"
#include "web/WebViewImpl.h"
#include <v8/include/v8.h>
@@ -23,7 +24,17 @@ namespace blink {
WebRemoteFrame* WebRemoteFrame::create(WebRemoteFrameClient* client)
{
- WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(client);
+ return WebRemoteFrame::create(WebTreeScopeType::Document, client);
+}
+
+WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, WebRemoteFrameClient* client)
+{
+ return WebRemoteFrameImpl::create(scope, client);
+}
+
+WebRemoteFrame* WebRemoteFrameImpl::create(WebTreeScopeType scope, WebRemoteFrameClient* client)
+{
+ WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(scope, client);
#if ENABLE(OILPAN)
return frame;
#else
@@ -31,15 +42,6 @@ WebRemoteFrame* WebRemoteFrame::create(WebRemoteFrameClient* client)
#endif
}
-WebRemoteFrameImpl::WebRemoteFrameImpl(WebRemoteFrameClient* client)
- : m_frameClient(this)
- , m_client(client)
-#if ENABLE(OILPAN)
- , m_selfKeepAlive(this)
-#endif
-{
-}
-
WebRemoteFrameImpl::~WebRemoteFrameImpl()
{
}
@@ -718,7 +720,12 @@ WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const
WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling)
{
- WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(client));
+ return createLocalChild(WebTreeScopeType::Document, name, sandboxFlags, client, previousSibling);
+}
+
+WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, const WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling)
+{
+ WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(scope, client));
WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult result =
m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, static_cast<SandboxFlags>(sandboxFlags)));
insertAfter(child, previousSibling);
@@ -733,6 +740,7 @@ WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebSa
return child;
}
+
void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name)
{
setCoreFrame(RemoteFrame::create(&m_frameClient, host, owner));
@@ -742,7 +750,12 @@ void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner,
WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(const WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client)
{
- WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(client));
+ return createRemoteChild(WebTreeScopeType::Document, name, sandboxFlags, client);
+}
+
+WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, const WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client)
+{
+ WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scope, client));
WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult result =
m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, static_cast<SandboxFlags>(sandboxFlags)));
appendChild(child);
@@ -810,4 +823,14 @@ void WebRemoteFrameImpl::didStopLoading()
}
}
+WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameClient* client)
+ : WebRemoteFrame(scope)
+ , m_frameClient(this)
+ , m_client(client)
+#if ENABLE(OILPAN)
+ , m_selfKeepAlive(this)
+#endif
+{
+}
+
} // namespace blink
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698