Index: content/child/service_worker/service_worker_dispatcher.h |
diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h |
index 9ef86ccee5de1e55f03a14f12e3621dbca4490ee..6d00a7f5e8303f91f836925b0c867b4f3e78299d 100644 |
--- a/content/child/service_worker/service_worker_dispatcher.h |
+++ b/content/child/service_worker/service_worker_dispatcher.h |
@@ -10,6 +10,7 @@ |
#include "base/id_map.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/strings/string16.h" |
#include "content/child/worker_task_runner.h" |
#include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
@@ -50,6 +51,9 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer { |
typedef |
blink::WebServiceWorkerProvider::WebServiceWorkerGetRegistrationCallbacks |
WebServiceWorkerGetRegistrationCallbacks; |
+ typedef blink::WebServiceWorkerProvider:: |
+ WebServiceWorkerGetReadyRegistrationCallbacks |
+ WebServiceWorkerGetReadyRegistrationCallbacks; |
explicit ServiceWorkerDispatcher(ThreadSafeSender* thread_safe_sender); |
~ServiceWorkerDispatcher() override; |
@@ -74,6 +78,10 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer { |
const GURL& document_url, |
WebServiceWorkerRegistrationCallbacks* callbacks); |
+ void GetReadyRegistration( |
+ int provider_id, |
+ WebServiceWorkerGetReadyRegistrationCallbacks* callbacks); |
+ |
// Called when a new provider context for a document is created. Usually |
// this happens when a new document is being loaded, and is called much |
// earlier than AddScriptClient. |
@@ -136,6 +144,8 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer { |
IDMapOwnPointer> UnregistrationCallbackMap; |
typedef IDMap<WebServiceWorkerGetRegistrationCallbacks, |
IDMapOwnPointer> GetRegistrationCallbackMap; |
+ typedef IDMap<WebServiceWorkerGetReadyRegistrationCallbacks, |
+ IDMapOwnPointer> GetReadyRegistrationCallbackMap; |
typedef std::map<int, blink::WebServiceWorkerProviderClient*> |
ProviderClientMap; |
@@ -173,6 +183,11 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer { |
int request_id, |
const ServiceWorkerRegistrationObjectInfo& info, |
const ServiceWorkerVersionAttributes& attrs); |
+ void OnDidGetReadyRegistration( |
+ int thread_id, |
+ int request_id, |
+ const ServiceWorkerRegistrationObjectInfo& info, |
+ const ServiceWorkerVersionAttributes& attrs); |
void OnRegistrationError(int thread_id, |
int request_id, |
blink::WebServiceWorkerError::ErrorType error_type, |
@@ -206,10 +221,6 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer { |
const std::vector<int>& sent_message_port_ids, |
const std::vector<int>& new_routing_ids); |
- void SetReadyRegistration( |
- int provider_id, |
- int registration_handle_id); |
- |
// Keeps map from handle_id to ServiceWorker object. |
void AddServiceWorker(int handle_id, WebServiceWorkerImpl* worker); |
void RemoveServiceWorker(int handle_id); |
@@ -228,6 +239,7 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer { |
RegistrationCallbackMap pending_registration_callbacks_; |
UnregistrationCallbackMap pending_unregistration_callbacks_; |
GetRegistrationCallbackMap pending_get_registration_callbacks_; |
+ GetReadyRegistrationCallbackMap ready_registration_callbacks_; |
ProviderClientMap provider_clients_; |
ProviderContextMap provider_contexts_; |