Index: content/browser/service_worker/embedded_worker_instance.h |
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h |
index f0f34314edd537b471a438ff7cbd874b18d12f16..5993a40c93fd20fdf5aa85f8c356ab40596029dc 100644 |
--- a/content/browser/service_worker/embedded_worker_instance.h |
+++ b/content/browser/service_worker/embedded_worker_instance.h |
@@ -37,6 +37,8 @@ namespace content { |
class EmbeddedWorkerRegistry; |
class MessagePortMessageFilter; |
+class ServiceRegistry; |
+class ServiceRegistryImpl; |
class ServiceWorkerContextCore; |
struct ServiceWorkerFetchRequest; |
@@ -118,6 +120,10 @@ class CONTENT_EXPORT EmbeddedWorkerInstance { |
// status. |
ServiceWorkerStatusCode SendMessage(const IPC::Message& message); |
+ // Returns the ServiceRegistry for this worker. It is invalid to call this |
+ // when the worker is not in STARTING or RUNNING status. |
+ ServiceRegistry* GetServiceRegistry(); |
+ |
int embedded_worker_id() const { return embedded_worker_id_; } |
Status status() const { return status_; } |
StartingPhase starting_phase() const { |
@@ -235,6 +241,7 @@ class CONTENT_EXPORT EmbeddedWorkerInstance { |
// Current running information. -1 indicates the worker is not running. |
int process_id_; |
int thread_id_; |
+ scoped_ptr<ServiceRegistryImpl> service_registry_; |
// Whether devtools is attached or not. |
bool devtools_attached_; |