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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1830883002: Add blink::ServiceRegistry and expose it from LocalFrame and Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 2e2133935801bc739eac56d46950ff10af6ff133..a10c5315e6619e2760d37b04a5f21d6fff5e94cf 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1411,19 +1411,19 @@ WebString WebLocalFrameImpl::layerTreeAsText(bool showDebugInfo) const
// WebLocalFrameImpl public ---------------------------------------------------------
-WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* client, WebFrame* opener)
+WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* client, WebFrame* opener, ServiceRegistry* serviceRegistry)
{
- return WebLocalFrameImpl::create(scope, client, opener);
+ return WebLocalFrameImpl::create(scope, client, opener, serviceRegistry);
}
-WebLocalFrame* WebLocalFrame::createProvisional(WebFrameClient* client, WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties)
+WebLocalFrame* WebLocalFrame::createProvisional(WebFrameClient* client, WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties, ServiceRegistry* serviceRegistry)
{
- return WebLocalFrameImpl::createProvisional(client, oldWebFrame, flags, frameOwnerProperties);
+ return WebLocalFrameImpl::createProvisional(client, oldWebFrame, flags, frameOwnerProperties, serviceRegistry);
}
-WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameClient* client, WebFrame* opener)
+WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameClient* client, WebFrame* opener, ServiceRegistry* serviceRegistry)
{
- WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client);
+ WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client, serviceRegistry);
frame->setOpener(opener);
#if ENABLE(OILPAN)
return frame;
@@ -1432,9 +1432,9 @@ WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameCli
#endif
}
-WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client, WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties)
+WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client, WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties, ServiceRegistry* serviceRegistry)
{
- RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebLocalFrameImpl(oldWebFrame, client));
+ RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebLocalFrameImpl(oldWebFrame, client, serviceRegistry));
Frame* oldFrame = oldWebFrame->toImplBase()->frame();
webFrame->setParent(oldWebFrame->parent());
webFrame->setOpener(oldWebFrame->opener());
@@ -1444,7 +1444,7 @@ WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
// disappear, so Page::m_mainFrame can't be updated just yet.
OwnPtrWillBeRawPtr<FrameOwner> tempOwner = DummyFrameOwner::create();
// TODO(dcheng): This block is very similar to initializeCoreFrame. Try to reuse it here.
- RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get());
+ RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get(), serviceRegistry);
// Set the name and unique name directly, bypassing any of the normal logic
// to calculate unique name.
frame->tree().setPrecalculatedName(toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName());
@@ -1470,8 +1470,7 @@ WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
#endif
}
-
-WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* client)
+WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* client, ServiceRegistry* serviceRegistry)
: WebLocalFrame(scope)
, m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this))
, m_frameWidget(0)
@@ -1482,6 +1481,7 @@ WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli
, m_userMediaClientImpl(this)
, m_geolocationClientProxy(GeolocationClientProxy::create(client ? client->geolocationClient() : 0))
, m_webDevToolsFrontend(0)
+ , m_serviceRegistry(serviceRegistry)
#if ENABLE(OILPAN)
, m_selfKeepAlive(this)
#endif
@@ -1490,8 +1490,8 @@ WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli
frameCount++;
}
-WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient* client)
- : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow : WebTreeScopeType::Document, client)
+WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient* client, ServiceRegistry* serviceRegistry)
+ : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow : WebTreeScopeType::Document, client, serviceRegistry)
{
}
@@ -1569,7 +1569,7 @@ void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& uniqueName)
{
- setCoreFrame(LocalFrame::create(m_frameLoaderClientImpl.get(), host, owner));
+ setCoreFrame(LocalFrame::create(m_frameLoaderClientImpl.get(), host, owner, m_serviceRegistry));
frame()->tree().setPrecalculatedName(name, uniqueName);
// We must call init() after m_frame is assigned because it is referenced
// during init(). Note that this may dispatch JS events; the frame may be

Powered by Google App Engine
This is Rietveld 408576698