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

Unified Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 2307543002: ServiceWorker: Mojofication of EWInstance::StopWorker (Closed)
Patch Set: Incorporated with the review Created 4 years, 3 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: content/renderer/service_worker/service_worker_context_client.h
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 3806ef8644b3308ffea21ec65fb2e2f164bae929..298fe80b12d7403d44d8f960ada8c85483875004 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -58,6 +58,7 @@ class ServiceWorkerProviderContext;
class ServiceWorkerContextClient;
class ThreadSafeSender;
class WebServiceWorkerRegistrationImpl;
+class EmbeddedWorkerInstanceClientImpl;
// This class provides access to/from an ServiceWorker's WorkerGlobalScope.
// Unless otherwise noted, all methods are called on the worker thread.
@@ -73,11 +74,13 @@ class ServiceWorkerContextClient
static ServiceWorkerContextClient* ThreadSpecificInstance();
// Called on the main thread.
- ServiceWorkerContextClient(int embedded_worker_id,
- int64_t service_worker_version_id,
- const GURL& service_worker_scope,
- const GURL& script_url,
- int worker_devtools_agent_route_id);
+ ServiceWorkerContextClient(
+ int embedded_worker_id,
+ int64_t service_worker_version_id,
+ const GURL& service_worker_scope,
+ const GURL& script_url,
+ int worker_devtools_agent_route_id,
+ std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker);
~ServiceWorkerContextClient() override;
void OnMessageReceived(int thread_id,
@@ -258,6 +261,9 @@ class ServiceWorkerContextClient
// Not owned; this object is destroyed when proxy_ becomes invalid.
blink::WebServiceWorkerContextProxy* proxy_;
+ // Renderer-side object corresponding to WebEmbeddedWorkerInstance
+ std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker_client_;
+
// Initialized on the worker thread in workerContextStarted and
// destructed on the worker thread in willDestroyWorkerContext.
std::unique_ptr<WorkerContextData> context_;

Powered by Google App Engine
This is Rietveld 408576698