| 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..933a968264ba8b1583f1c29bbc1ac9394b6e3b80 100644
|
| --- a/content/browser/service_worker/service_worker_version.h
|
| +++ b/content/browser/service_worker/service_worker_version.h
|
| @@ -52,7 +52,6 @@ class ServiceWorkerProviderHost;
|
| class ServiceWorkerRegistration;
|
| class ServiceWorkerURLRequestJob;
|
| struct NavigatorConnectClient;
|
| -struct PlatformNotificationData;
|
| struct ServiceWorkerClientInfo;
|
| struct ServiceWorkerVersionInfo;
|
| struct TransferredMessagePort;
|
| @@ -259,17 +258,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| const base::Closure& prepare_callback,
|
| const FetchCallback& fetch_callback);
|
|
|
| - // 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.
|
| - //
|
| - // This must be called when the status() is ACTIVATED.
|
| - void DispatchNotificationClickEvent(
|
| - const StatusCallback& callback,
|
| - int64_t persistent_notification_id,
|
| - const PlatformNotificationData& notification_data,
|
| - int action_index);
|
| -
|
| // 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.
|
| @@ -403,7 +391,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| REQUEST_ACTIVATE,
|
| REQUEST_INSTALL,
|
| REQUEST_FETCH,
|
| - REQUEST_NOTIFICATION_CLICK,
|
| REQUEST_PUSH,
|
| REQUEST_CUSTOM,
|
| NUM_REQUEST_TYPES
|
| @@ -565,7 +552,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| void OnFetchEventFinished(int request_id,
|
| ServiceWorkerFetchEventResult result,
|
| const ServiceWorkerResponse& response);
|
| - void OnNotificationClickEventFinished(int request_id);
|
| void OnPushEventFinished(int request_id,
|
| blink::WebServiceWorkerEventResult result);
|
| void OnOpenWindow(int request_id, GURL url);
|
| @@ -694,8 +680,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> activate_requests_;
|
| IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> install_requests_;
|
| IDMap<PendingRequest<FetchCallback>, IDMapOwnPointer> fetch_requests_;
|
| - IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer>
|
| - notification_click_requests_;
|
| IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> push_requests_;
|
| IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> custom_requests_;
|
|
|
| @@ -818,12 +802,16 @@ bool ServiceWorkerVersion::EventResponseHandler<ResponseMessage, CallbackType>::
|
| if (!result || received_request_id != request_id_)
|
| return false;
|
|
|
| + CallbackType protect(callback_);
|
| // Essentially same code as what IPC_MESSAGE_FORWARD expands to.
|
| void* param = nullptr;
|
| if (!ResponseMessage::Dispatch(&message, &callback_, this, param,
|
| &CallbackType::Run))
|
| message.set_dispatch_error();
|
|
|
| + // At this point |this| can have been deleted, so don't do anything other
|
| + // than returning.
|
| +
|
| return true;
|
| }
|
|
|
|
|