Index: content/browser/service_worker/service_worker_register_job.h |
diff --git a/content/browser/service_worker/service_worker_register_job.h b/content/browser/service_worker/service_worker_register_job.h |
index 88216d66fc843aa059008528371f46ddbd60db2e..48c77c1544823828099d286ebaadeac679b75007 100644 |
--- a/content/browser/service_worker/service_worker_register_job.h |
+++ b/content/browser/service_worker/service_worker_register_job.h |
@@ -10,9 +10,12 @@ |
#include "base/memory/weak_ptr.h" |
#include "content/browser/service_worker/service_worker_registration_status.h" |
#include "content/browser/service_worker/service_worker_storage.h" |
+#include "content/browser/service_worker/service_worker_version.h" |
+#include "content/browser/service_worker/service_worker_version_status.h" |
namespace content { |
+class EmbeddedWorkerRegistry; |
class ServiceWorkerJobCoordinator; |
// A ServiceWorkerRegisterJob lives only for the lifetime of a single |
@@ -33,13 +36,15 @@ class ServiceWorkerRegisterJob { |
// All type of jobs (Register and Unregister) complete through a |
// single call to this callback on the IO thread. |
ServiceWorkerRegisterJob(ServiceWorkerStorage* storage, |
+ EmbeddedWorkerRegistry* worker_registry, |
ServiceWorkerJobCoordinator* coordinator, |
const GURL& pattern, |
const GURL& script_url, |
RegistrationType type); |
~ServiceWorkerRegisterJob(); |
- void AddCallback(const RegistrationCallback& callback); |
+ void AddCallback(const RegistrationCallback& callback, |
+ ServiceWorkerProviderHost* source_provider); |
void Start(); |
@@ -77,12 +82,20 @@ class ServiceWorkerRegisterJob { |
ServiceWorkerRegistrationStatus previous_status, |
const scoped_refptr<ServiceWorkerRegistration>& previous_registration); |
+ void StartWorkerAndContinue( |
+ const base::Callback<void(ServiceWorkerRegistrationStatus, |
+ const scoped_refptr<ServiceWorkerRegistration>&, |
+ ServiceWorkerVersionStatus)> callback, |
+ ServiceWorkerRegistrationStatus status, |
+ const scoped_refptr<ServiceWorkerRegistration>& registration); |
+ |
// These methods are the last internal callback in the callback |
// chain, and ultimately call callback_. |
void UnregisterComplete(ServiceWorkerRegistrationStatus status); |
void RegisterComplete( |
ServiceWorkerRegistrationStatus status, |
- const scoped_refptr<ServiceWorkerRegistration>& registration); |
+ const scoped_refptr<ServiceWorkerRegistration>& registration, |
+ ServiceWorkerVersionStatus version_status); |
void RunCallbacks( |
ServiceWorkerRegistrationStatus status, |
@@ -96,11 +109,14 @@ class ServiceWorkerRegisterJob { |
// because we may be cancelling while there are outstanding |
// callbacks that expect access to storage_. |
ServiceWorkerStorage* storage_; |
+ EmbeddedWorkerRegistry* worker_registry_; |
ServiceWorkerJobCoordinator* coordinator_; |
+ scoped_refptr<ServiceWorkerVersion> pending_version_; |
const GURL pattern_; |
const GURL script_url_; |
const RegistrationType type_; |
std::vector<RegistrationCallback> callbacks_; |
+ std::vector<ServiceWorkerProviderHost*> pending_provider_hosts_; |
base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); |