Chromium Code Reviews| Index: content/browser/service_worker/service_worker_context_core.h |
| diff --git a/content/browser/service_worker/service_worker_context_core.h b/content/browser/service_worker/service_worker_context_core.h |
| index 4832b8c4eb4c2680d855385a1b8c8bd542f44b71..93bbcf978ee779330d06064d15e7e38c1af498d4 100644 |
| --- a/content/browser/service_worker/service_worker_context_core.h |
| +++ b/content/browser/service_worker/service_worker_context_core.h |
| @@ -44,6 +44,7 @@ class EmbeddedWorkerRegistry; |
| class ServiceWorkerContextObserver; |
| class ServiceWorkerContextWrapper; |
| class ServiceWorkerDatabaseTaskManager; |
| +class ServiceWorkerDispatcherHost; |
| class ServiceWorkerJobCoordinator; |
| class ServiceWorkerNavigationHandleCore; |
| class ServiceWorkerProviderHost; |
| @@ -154,10 +155,19 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| return job_coordinator_.get(); |
| } |
| + // Maintains DispatcherHosts to exchange service worker related messages |
| + // through them. The DispatcherHosts are not owned by this class. |
| + void AddDispatcherHost(int process_id, |
| + ServiceWorkerDispatcherHost* dispatcher_host); |
| + ServiceWorkerDispatcherHost* GetDispatcherHost(int process_id); |
| + void RemoveDispatcherHost(int process_id); |
| + |
| // The context class owns the set of ProviderHosts. |
| - ServiceWorkerProviderHost* GetProviderHost(int process_id, int provider_id); |
| void AddProviderHost( |
| std::unique_ptr<ServiceWorkerProviderHost> provider_host); |
| + void AddProviderHost(int process_id, |
|
horo
2017/02/08 02:14:11
Remove this.
shimazu
2017/02/13 03:25:56
Done.
|
| + ServiceWorkerProviderHostInfo provider_host_info); |
| + ServiceWorkerProviderHost* GetProviderHost(int process_id, int provider_id); |
| void RemoveProviderHost(int process_id, int provider_id); |
| void RemoveAllProviderHostsForProcess(int process_id); |
| std::unique_ptr<ProviderHostIterator> GetProviderHostIterator(); |
| @@ -342,6 +352,7 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| // because the Wrapper::Shutdown call that hops threads to destroy |this| uses |
| // Bind() to hold a reference to |wrapper_| until |this| is fully destroyed. |
| ServiceWorkerContextWrapper* wrapper_; |
| + std::unique_ptr<IDMap<ServiceWorkerDispatcherHost*>> dispatcher_hosts_; |
| std::unique_ptr<ProcessToProviderMap> providers_; |
| std::unique_ptr<ProviderByClientUUIDMap> provider_by_uuid_; |
| std::unique_ptr<ServiceWorkerStorage> storage_; |