| 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 9ab45a237a6ca71fb0cf2360bb9d79a6d00a9c08..7d1daadc46c9707e4404a3c7fee267844336f8d5 100644
|
| --- a/content/browser/service_worker/service_worker_dispatcher_host.h
|
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
|
| #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
|
|
|
| +#include "base/id_map.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "content/browser/service_worker/service_worker_registration_status.h"
|
| #include "content/public/browser/browser_message_filter.h"
|
| @@ -16,6 +17,7 @@ namespace content {
|
| class MessagePortMessageFilter;
|
| class ServiceWorkerContextCore;
|
| class ServiceWorkerContextWrapper;
|
| +class ServiceWorkerHandle;
|
| class ServiceWorkerProviderHost;
|
| class ServiceWorkerRegistration;
|
|
|
| @@ -32,6 +34,9 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
|
| virtual bool OnMessageReceived(const IPC::Message& message,
|
| bool* message_was_ok) OVERRIDE;
|
|
|
| + // Returns a new handle id.
|
| + int RegisterServiceWorkerHandle(scoped_ptr<ServiceWorkerHandle> handle);
|
| +
|
| protected:
|
| virtual ~ServiceWorkerDispatcherHost();
|
|
|
| @@ -64,6 +69,7 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
|
| void OnPostMessage(int64 version_id,
|
| const base::string16& message,
|
| const std::vector<int>& sent_message_port_ids);
|
| + void OnServiceWorkerObjectDestroyed(int handle_id);
|
|
|
| // Callbacks from ServiceWorkerContextCore
|
| void RegistrationComplete(int thread_id,
|
| @@ -82,8 +88,11 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
|
|
|
| int render_process_id_;
|
| MessagePortMessageFilter* const message_port_message_filter_;
|
| -
|
| base::WeakPtr<ServiceWorkerContextCore> context_;
|
| +
|
| + IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost);
|
| };
|
|
|
| } // namespace content
|
|
|