Chromium Code Reviews| Index: content/child/service_worker/service_worker_provider_context.h |
| diff --git a/content/child/service_worker/service_worker_provider_context.h b/content/child/service_worker/service_worker_provider_context.h |
| index 192be968692b86a8b7e28e4e62823dd9cc1015ae..e6de7a9c7fb462efdb47b0df74c5b1af31bcfaaa 100644 |
| --- a/content/child/service_worker/service_worker_provider_context.h |
| +++ b/content/child/service_worker/service_worker_provider_context.h |
| @@ -13,7 +13,9 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/sequenced_task_runner_helpers.h" |
| #include "content/common/content_export.h" |
| +#include "content/common/service_worker/service_worker_provider_interfaces.mojom.h" |
| #include "content/common/service_worker/service_worker_types.h" |
| +#include "mojo/public/cpp/bindings/associated_binding.h" |
| namespace base { |
| class SingleThreadTaskRunner; |
| @@ -44,11 +46,19 @@ class ThreadSafeSender; |
| // ControlleeDelegate and ControllerDelegate. |
| class CONTENT_EXPORT ServiceWorkerProviderContext |
| : public base::RefCountedThreadSafe<ServiceWorkerProviderContext, |
| - ServiceWorkerProviderContextDeleter> { |
| + ServiceWorkerProviderContextDeleter>, |
| + NON_EXPORTED_BASE(public mojom::ServiceWorkerProvider) { |
| public: |
| - ServiceWorkerProviderContext(int provider_id, |
| - ServiceWorkerProviderType provider_type, |
| - ThreadSafeSender* thread_safe_sender); |
| + // |provider_id| specifies which host will receive the message from this |
| + // provider. |provider_type| changes the behavior of this provider |
| + // context. |request| is an endpoint which is connected to |
| + // content::ServiceWorkerProviderHost which notifies changes of the |
| + // registration's and workers' status. |request| is bound with |binding_|. |
| + ServiceWorkerProviderContext( |
| + int provider_id, |
| + ServiceWorkerProviderType provider_type, |
| + mojom::ServiceWorkerProviderAssociatedRequest request, |
| + ThreadSafeSender* thread_safe_sender); |
| // Called from ServiceWorkerDispatcher. |
| void OnAssociateRegistration( |
| @@ -84,12 +94,13 @@ class CONTENT_EXPORT ServiceWorkerProviderContext |
| class ControlleeDelegate; |
| class ControllerDelegate; |
| - ~ServiceWorkerProviderContext(); |
| + ~ServiceWorkerProviderContext() override; |
| void DestructOnMainThread() const; |
| const int provider_id_; |
| scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
|
falken
2017/05/22 08:28:12
// Mojo binding for the |request| passed to the co
shimazu
2017/05/23 06:29:34
Done.
|
| + mojo::AssociatedBinding<mojom::ServiceWorkerProvider> binding_; |
| std::unique_ptr<Delegate> delegate_; |