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 e0dde76b0e6e6e5c04876b441e5a5bbacbd7b243..3a7dc90f8570141287bdb61e417dd9c495e753f2 100644 |
--- a/content/browser/service_worker/service_worker_version.h |
+++ b/content/browser/service_worker/service_worker_version.h |
@@ -174,6 +174,13 @@ class CONTENT_EXPORT ServiceWorkerVersion |
// This must be called when the status() is ACTIVE. |
void DispatchSyncEvent(const StatusCallback& callback); |
+ // Sends push event to the associated embedded worker and asynchronously calls |
+ // |callback| when it errors out or it gets response from the worker to notify |
+ // completion. |
+ // |
+ // This must be called when the status() is ACTIVE. |
+ void DispatchPushEvent(const StatusCallback& callback); |
+ |
// These are expected to be called when a renderer process host for the |
// same-origin as for this ServiceWorkerVersion is created. The added |
// processes are used to run an in-renderer embedded worker. |
@@ -237,6 +244,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
ServiceWorkerFetchEventResult result, |
const ServiceWorkerResponse& response); |
void OnSyncEventFinished(int request_id); |
+ void OnPushEventFinished(int request_id); |
void OnPostMessageToDocument(int client_id, |
const base::string16& message, |
const std::vector<int>& sent_message_port_ids); |
@@ -258,6 +266,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_; |
IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_; |
IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_; |
+ IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_; |
ControlleeMap controllee_map_; |
ControlleeByIDMap controllee_by_id_; |