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 96c54453043cc695265eb67c440b6f02a2f8f172..093d1ec70d379d1f073f6a54427c515257a93397 100644 |
--- a/content/browser/service_worker/service_worker_version.h |
+++ b/content/browser/service_worker/service_worker_version.h |
@@ -270,6 +270,16 @@ class CONTENT_EXPORT ServiceWorkerVersion |
const PlatformNotificationData& notification_data, |
int action_index); |
+ // Sends notificationclose 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. |
+ // |
+ // This must be called when the status() is ACTIVATED. |
+ void DispatchNotificationCloseEvent( |
+ const StatusCallback& callback, |
+ int64_t persistent_notification_id, |
+ const PlatformNotificationData& notification_data); |
+ |
// Sends push 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. |
@@ -404,6 +414,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
REQUEST_INSTALL, |
REQUEST_FETCH, |
REQUEST_NOTIFICATION_CLICK, |
+ REQUEST_NOTIFICATION_CLOSE, |
REQUEST_PUSH, |
REQUEST_CUSTOM, |
NUM_REQUEST_TYPES |
@@ -569,6 +580,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
void OnPushEventFinished(int request_id, |
blink::WebServiceWorkerEventResult result); |
void OnOpenWindow(int request_id, GURL url); |
+ void OnNotificationCloseEventFinished(int request_id); |
void OnOpenWindowFinished(int request_id, |
ServiceWorkerStatusCode status, |
const std::string& client_uuid, |
@@ -696,6 +708,8 @@ class CONTENT_EXPORT ServiceWorkerVersion |
IDMap<PendingRequest<FetchCallback>, IDMapOwnPointer> fetch_requests_; |
IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> |
notification_click_requests_; |
+ IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> |
+ notification_close_requests_; |
IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> push_requests_; |
IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> custom_requests_; |