| 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 f813389a8a09c2c16370bda14de8f2f84771cb8f..742d9fc2c1b4d9e46d1332234a751946aa238c43 100644
|
| --- a/content/browser/service_worker/service_worker_dispatcher_host.h
|
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.h
|
| @@ -42,6 +42,9 @@ struct ServiceWorkerObjectInfo;
|
| struct ServiceWorkerRegistrationObjectInfo;
|
| struct ServiceWorkerVersionAttributes;
|
|
|
| +// MessageFilter for service workers. This class receives IPCs to manipulate
|
| +// service workers from the renderer process regardless of hosting page or
|
| +// service worker's context. This can be override only for testing.
|
| class CONTENT_EXPORT ServiceWorkerDispatcherHost
|
| : public mojom::ServiceWorkerDispatcherHost,
|
| public BrowserMessageFilter {
|
| @@ -66,13 +69,22 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
|
| // be destroyed.
|
| bool Send(IPC::Message* message) override;
|
|
|
| - void RegisterServiceWorkerHandle(std::unique_ptr<ServiceWorkerHandle> handle);
|
| - void RegisterServiceWorkerRegistrationHandle(
|
| + // Virtual for testing.
|
| + virtual void RegisterServiceWorkerHandle(
|
| + std::unique_ptr<ServiceWorkerHandle> handle);
|
| + // Virtual for testing.
|
| + virtual void RegisterServiceWorkerRegistrationHandle(
|
| std::unique_ptr<ServiceWorkerRegistrationHandle> handle);
|
|
|
| ServiceWorkerHandle* FindServiceWorkerHandle(int provider_id,
|
| int64_t version_id);
|
|
|
| + void GetRegistrationObjectInfoAndVersionAttributes(
|
| + base::WeakPtr<ServiceWorkerProviderHost> provider_host,
|
| + ServiceWorkerRegistration* registration,
|
| + ServiceWorkerRegistrationObjectInfo* info,
|
| + ServiceWorkerVersionAttributes* attrs);
|
| +
|
| // Returns the existing registration handle whose reference count is
|
| // incremented or a newly created one if it doesn't exist.
|
| ServiceWorkerRegistrationHandle* GetOrCreateRegistrationHandle(
|
| @@ -101,9 +113,6 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
|
|
|
| // mojom::ServiceWorkerDispatcherHost implementation
|
| void OnProviderCreated(ServiceWorkerProviderHostInfo info) override;
|
| - void OnSetHostedVersionId(int provider_id,
|
| - int64_t version_id,
|
| - int embedded_worker_id) override;
|
|
|
| // IPC Message handlers
|
| void OnRegisterServiceWorker(int thread_id,
|
| @@ -192,12 +201,6 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
|
| int provider_id,
|
| int64_t registration_handle_id);
|
|
|
| - void GetRegistrationObjectInfoAndVersionAttributes(
|
| - base::WeakPtr<ServiceWorkerProviderHost> provider_host,
|
| - ServiceWorkerRegistration* registration,
|
| - ServiceWorkerRegistrationObjectInfo* info,
|
| - ServiceWorkerVersionAttributes* attrs);
|
| -
|
| // Callbacks from ServiceWorkerContextCore
|
| void RegistrationComplete(int thread_id,
|
| int provider_id,
|
|
|