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 28b9f4f98677b0094ab07abfcd9bcd53f32c5629..01b88cc638a301a9d57cf5190ced17ee87bc6cd2 100644 |
--- a/content/child/service_worker/service_worker_dispatcher.h |
+++ b/content/child/service_worker/service_worker_dispatcher.h |
@@ -52,6 +52,9 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
typedef |
blink::WebServiceWorkerProvider::WebServiceWorkerGetRegistrationCallbacks |
WebServiceWorkerGetRegistrationCallbacks; |
+ typedef |
+ blink::WebServiceWorkerProvider::WebServiceWorkerGetRegistrationsCallbacks |
+ WebServiceWorkerGetRegistrationsCallbacks; |
typedef blink::WebServiceWorkerProvider:: |
WebServiceWorkerGetRegistrationForReadyCallbacks |
WebServiceWorkerGetRegistrationForReadyCallbacks; |
@@ -78,6 +81,10 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
int provider_id, |
const GURL& document_url, |
WebServiceWorkerRegistrationCallbacks* callbacks); |
+ // Corresponds to navigator.serviceWorker.getRegistrations() |
+ void GetRegistrations( |
+ int provider_id, |
+ WebServiceWorkerGetRegistrationsCallbacks* callbacks); |
void GetRegistrationForReady( |
int provider_id, |
@@ -137,6 +144,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
IDMapOwnPointer> UnregistrationCallbackMap; |
typedef IDMap<WebServiceWorkerGetRegistrationCallbacks, |
IDMapOwnPointer> GetRegistrationCallbackMap; |
+ typedef IDMap<WebServiceWorkerGetRegistrationsCallbacks, |
+ IDMapOwnPointer> GetRegistrationsCallbackMap; |
typedef IDMap<WebServiceWorkerGetRegistrationForReadyCallbacks, |
IDMapOwnPointer> GetRegistrationForReadyCallbackMap; |
@@ -177,6 +186,11 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
int request_id, |
const ServiceWorkerRegistrationObjectInfo& info, |
const ServiceWorkerVersionAttributes& attrs); |
+ void OnDidGetRegistrations( |
+ int thread_id, |
+ int request_id, |
+ const std::vector<ServiceWorkerRegistrationObjectInfo>& infos, |
+ const std::vector<ServiceWorkerVersionAttributes>& attrs); |
void OnDidGetRegistrationForReady( |
int thread_id, |
int request_id, |
@@ -195,6 +209,11 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
int request_id, |
blink::WebServiceWorkerError::ErrorType error_type, |
const base::string16& message); |
+ void OnGetRegistrationsError( |
+ int thread_id, |
+ int request_id, |
+ blink::WebServiceWorkerError::ErrorType error_type, |
+ const base::string16& message); |
void OnServiceWorkerStateChanged(int thread_id, |
int handle_id, |
blink::WebServiceWorkerState state); |
@@ -239,6 +258,7 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
RegistrationCallbackMap pending_registration_callbacks_; |
UnregistrationCallbackMap pending_unregistration_callbacks_; |
GetRegistrationCallbackMap pending_get_registration_callbacks_; |
+ GetRegistrationsCallbackMap pending_get_registrations_callbacks_; |
GetRegistrationForReadyCallbackMap get_for_ready_callbacks_; |
ProviderClientMap provider_clients_; |