Index: content/child/push_messaging/push_provider.h |
diff --git a/content/child/push_messaging/push_provider.h b/content/child/push_messaging/push_provider.h |
index 313a304a5cbdb1dd661ab40684b0b715afb1ba2a..996258e384a85a4bce680a85fd35e082b57cd758 100644 |
--- a/content/child/push_messaging/push_provider.h |
+++ b/content/child/push_messaging/push_provider.h |
@@ -33,10 +33,12 @@ class PushProvider : public blink::WebPushProvider, |
void OnWorkerRunLoopStopped() override; |
// blink::WebPushProvider implementation. |
- void registerPushMessaging(blink::WebServiceWorkerRegistration*, |
- blink::WebPushRegistrationCallbacks*) override; |
- void getPermissionStatus(blink::WebServiceWorkerRegistration*, |
- blink::WebPushPermissionStatusCallbacks*) override; |
+ virtual void registerPushMessaging(blink::WebServiceWorkerRegistration*, |
+ blink::WebPushRegistrationCallbacks*); |
+ virtual void getPermissionStatus(blink::WebServiceWorkerRegistration*, |
+ blink::WebPushPermissionStatusCallbacks*); |
+ virtual void unregister(blink::WebServiceWorkerRegistration*, |
+ blink::WebPushUnregisterCallbacks*); |
// Called by the PushDispatcher. |
bool OnMessageReceived(const IPC::Message& message); |
@@ -53,6 +55,7 @@ class PushProvider : public blink::WebPushProvider, |
void OnGetPermissionStatusSuccess(int request_id, |
blink::WebPushPermissionStatus status); |
void OnGetPermissionStatusError(int request_id); |
+ void OnUnregisterResponse(int request_id, bool response); |
Michael van Ouwerkerk
2014/12/12 13:55:41
nit: consider renaming |response| to something mor
mlamouri (slow - plz ping)
2014/12/15 11:29:37
Done.
|
scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
scoped_refptr<PushDispatcher> push_dispatcher_; |
@@ -66,6 +69,10 @@ class PushProvider : public blink::WebPushProvider, |
std::map<int, blink::WebPushPermissionStatusCallbacks*> |
permission_status_callbacks_; |
+ // Stores the unregistration callbacks with their request ids. This class owns |
+ // the callbacks. |
+ std::map<int, blink::WebPushUnregisterCallbacks*> unregister_callbacks_; |
Michael van Ouwerkerk
2014/12/12 13:55:41
Aha, leaking a whole map of raw pointers, just lik
mlamouri (slow - plz ping)
2014/12/15 11:29:37
Yeah. Right. I usually use IDMap<> and have it own
|
+ |
DISALLOW_COPY_AND_ASSIGN(PushProvider); |
}; |