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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 900793002: ServiceWorker: Support SWRegistration.unregister() in SWGlobalScope [2/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update layout tests and header comment Created 5 years, 10 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: Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index 2859e49573d147c7b90c81bba82fa2928568e6c7..2639d824834469f26e2762b2a87c8122ea279c25 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -46,12 +46,14 @@
#include "core/workers/WorkerScriptLoader.h"
#include "core/workers/WorkerScriptLoaderClient.h"
#include "core/workers/WorkerThreadStartupData.h"
+#include "modules/serviceworkers/ServiceWorkerContainerClient.h"
#include "modules/serviceworkers/ServiceWorkerThread.h"
#include "platform/SharedBuffer.h"
#include "platform/heap/Handle.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "platform/network/ContentSecurityPolicyResponseHeaders.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebServiceWorkerProvider.h"
#include "public/platform/WebURLRequest.h"
#include "public/web/WebDevToolsAgent.h"
#include "public/web/WebServiceWorkerContextClient.h"
@@ -404,6 +406,7 @@ void WebEmbeddedWorkerImpl::startWorkerThread()
OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
providePermissionClientToWorker(workerClients.get(), m_permissionClient.release());
provideServiceWorkerGlobalScopeClientToWorker(workerClients.get(), ServiceWorkerGlobalScopeClientImpl::create(*m_workerContextClient));
+ provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPtr(m_workerContextClient->createServiceWorkerProvider()));
// We need to set the CSP to both the shadow page's document and the ServiceWorkerGlobalScope.
document->initContentSecurityPolicy(m_mainScriptLoader->releaseContentSecurityPolicy());
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp ('k') | public/web/WebServiceWorkerContextClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698