Chromium Code Reviews| Index: content/browser/service_worker/service_worker_dispatcher_host.h |
| diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h |
| index 449cb2c67e00024a760a690d1e00da30e9780826..2b38c0a89d7f4deff2f06be00722516af91b3758 100644 |
| --- a/content/browser/service_worker/service_worker_dispatcher_host.h |
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.h |
| @@ -5,18 +5,21 @@ |
| #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
| #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
| +#include "base/memory/weak_ptr.h" |
| #include "content/public/browser/browser_message_filter.h" |
| class GURL; |
| namespace content { |
| -class ServiceWorkerContext; |
| +class ServiceWorkerContextCore; |
| +class ServiceWorkerContextWrapper; |
| class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter { |
| public: |
| - ServiceWorkerDispatcherHost(int render_process_id, |
| - ServiceWorkerContext* context); |
| + ServiceWorkerDispatcherHost(int render_process_id); |
|
kinuko
2013/11/09 09:39:56
explicit
michaeln
2013/11/11 16:40:25
Done.
|
| + |
| + void Init(ServiceWorkerContextWrapper* context_wrapper); |
| // BrowserIOMessageFilter implementation |
| virtual bool OnMessageReceived(const IPC::Message& message, |
| @@ -26,6 +29,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter { |
| virtual ~ServiceWorkerDispatcherHost(); |
| private: |
| + friend class TestingServiceWorkerDispatcherHost; |
| + |
| // IPC Message handlers |
| void OnRegisterServiceWorker(int32 thread_id, |
| int32 request_id, |
| @@ -34,7 +39,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter { |
| void OnUnregisterServiceWorker(int32 thread_id, |
| int32 request_id, |
| const GURL& scope); |
| - scoped_refptr<ServiceWorkerContext> context_; |
| + |
| + base::WeakPtr<ServiceWorkerContextCore> context_; |
| }; |
| } // namespace content |