Chromium Code Reviews| Index: content/browser/service_worker/service_worker_version.h |
| diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h |
| index d77ed99202c02013e012641c7be48c86996778c0..14c609a7849ea1a533efca0a8dc6a5c44c3fde0b 100644 |
| --- a/content/browser/service_worker/service_worker_version.h |
| +++ b/content/browser/service_worker/service_worker_version.h |
| @@ -21,6 +21,7 @@ |
| #include "base/timer/timer.h" |
| #include "content/browser/service_worker/embedded_worker_instance.h" |
| #include "content/browser/service_worker/service_worker_script_cache_map.h" |
| +#include "content/common/background_sync_service.mojom.h" |
| #include "content/common/content_export.h" |
| #include "content/common/service_worker/service_worker_status_code.h" |
| #include "content/common/service_worker/service_worker_types.h" |
| @@ -46,6 +47,7 @@ namespace content { |
| class EmbeddedWorkerRegistry; |
| class ServiceWorkerContextCore; |
| +class ServiceWorkerEventDispatcher; |
| class ServiceWorkerProviderHost; |
| class ServiceWorkerRegistration; |
| class ServiceWorkerURLRequestJob; |
| @@ -210,6 +212,10 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| // This must be called when the status() is ACTIVATED. |
| void DispatchSyncEvent(const StatusCallback& callback); |
| + // Handle callbacks from background sync events |
| + void OnSyncEventFinished(const StatusCallback& callback, |
|
jkarlin
2015/06/12 21:08:14
Did this need to be made public?
iclelland
2015/06/16 15:59:16
No, it did not; (well, once upon a time, during re
|
| + ServiceWorkerStatusCode status); |
| + |
| // Sends notificationclick event to the associated embedded worker and |
| // asynchronously calls |callback| when it errors out or it gets a response |
| // from the worker to notify completion. |
| @@ -354,7 +360,6 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| REQUEST_ACTIVATE, |
| REQUEST_INSTALL, |
| REQUEST_FETCH, |
| - REQUEST_SYNC, |
| REQUEST_NOTIFICATION_CLICK, |
| REQUEST_PUSH, |
| REQUEST_GEOFENCING, |
| @@ -416,8 +421,6 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| void OnFetchEventFinished(int request_id, |
| ServiceWorkerFetchEventResult result, |
| const ServiceWorkerResponse& response); |
| - void OnSyncEventFinished(int request_id, |
| - blink::WebServiceWorkerEventResult result); |
| void OnNotificationClickEventFinished(int request_id); |
| void OnPushEventFinished(int request_id, |
| blink::WebServiceWorkerEventResult result); |
| @@ -523,7 +526,6 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| IDMap<StatusCallback, IDMapOwnPointer> activate_callbacks_; |
| IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_; |
| IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_; |
| - IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_; |
| IDMap<StatusCallback, IDMapOwnPointer> notification_click_callbacks_; |
| IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_; |
| IDMap<StatusCallback, IDMapOwnPointer> geofencing_callbacks_; |
| @@ -568,6 +570,8 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| scoped_ptr<PingController> ping_controller_; |
| scoped_ptr<Metrics> metrics_; |
| + scoped_refptr<ServiceWorkerEventDispatcher> event_dispatcher_; |
|
jkarlin
2015/06/12 21:08:14
suggest mojo_event_dispatcher_
iclelland
2015/06/16 15:59:16
Done.
|
| + |
| base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |