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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.h

Issue 887463003: Turn WorkerLoaderProxy into a threadsafe, ref-counted object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clarify WorkerLoaderProxyProvider's obligations on shutdown 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
« no previous file with comments | « Source/modules/websockets/WorkerWebSocketChannel.cpp ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebEmbeddedWorkerImpl.h
diff --git a/Source/web/WebEmbeddedWorkerImpl.h b/Source/web/WebEmbeddedWorkerImpl.h
index 10820baa69da098692c31f5ffd2266d177701f9e..5fa8fd55b1489f1ca5de5d33d0a925f7052f9e6b 100644
--- a/Source/web/WebEmbeddedWorkerImpl.h
+++ b/Source/web/WebEmbeddedWorkerImpl.h
@@ -31,6 +31,8 @@
#ifndef WebEmbeddedWorkerImpl_h
#define WebEmbeddedWorkerImpl_h
+#include "core/workers/WorkerLoaderProxy.h"
+
#include "public/web/WebContentSecurityPolicy.h"
#include "public/web/WebDevToolsAgentClient.h"
#include "public/web/WebEmbeddedWorker.h"
@@ -48,12 +50,11 @@ class WorkerThread;
class WebEmbeddedWorkerImpl final
: public WebEmbeddedWorker
, public WebFrameClient
- , public WebDevToolsAgentClient {
+ , public WebDevToolsAgentClient
+ , private WorkerLoaderProxyProvider {
WTF_MAKE_NONCOPYABLE(WebEmbeddedWorkerImpl);
public:
- WebEmbeddedWorkerImpl(
- PassOwnPtr<WebServiceWorkerContextClient>,
- PassOwnPtr<WebWorkerPermissionClientProxy>);
+ WebEmbeddedWorkerImpl(PassOwnPtr<WebServiceWorkerContextClient>, PassOwnPtr<WebWorkerPermissionClientProxy>);
virtual ~WebEmbeddedWorkerImpl();
// Terminate all WebEmbeddedWorkerImpl for testing purposes.
@@ -74,7 +75,6 @@ public:
private:
class Loader;
- class LoaderProxy;
void prepareShadowPageForLoader();
void loadShadowPage();
@@ -92,6 +92,10 @@ private:
void onScriptLoaderFinished();
void startWorkerThread();
+ // WorkerLoaderProxyProvider
+ virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) override;
+ virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) override;
+
WebEmbeddedWorkerStartData m_workerStartData;
OwnPtr<WebServiceWorkerContextClient> m_workerContextClient;
@@ -108,7 +112,7 @@ private:
OwnPtr<Loader> m_mainScriptLoader;
RefPtr<WorkerThread> m_workerThread;
- OwnPtr<LoaderProxy> m_loaderProxy;
+ RefPtr<WorkerLoaderProxy> m_loaderProxy;
OwnPtr<ServiceWorkerGlobalScopeProxy> m_workerGlobalScopeProxy;
OwnPtr<WorkerInspectorProxy> m_workerInspectorProxy;
« no previous file with comments | « Source/modules/websockets/WorkerWebSocketChannel.cpp ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698