| Index: public/platform/modules/push_messaging/WebPushProvider.h
|
| diff --git a/public/platform/modules/push_messaging/WebPushProvider.h b/public/platform/modules/push_messaging/WebPushProvider.h
|
| index cefc96117453fc9eb56aa5b04e67b7e44e7d9ad1..1e9494ef07b55fd5e5b170c60518d452427ea995 100644
|
| --- a/public/platform/modules/push_messaging/WebPushProvider.h
|
| +++ b/public/platform/modules/push_messaging/WebPushProvider.h
|
| @@ -6,17 +6,44 @@
|
| #define WebPushProvider_h
|
|
|
| #include "public/platform/WebCallbacks.h"
|
| +#include "public/platform/WebPassOwnPtr.h"
|
| +#include "public/platform/modules/push_messaging/WebPushError.h"
|
| #include "public/platform/modules/push_messaging/WebPushPermissionStatus.h"
|
| +#include "public/platform/modules/push_messaging/WebPushSubscription.h"
|
|
|
| namespace blink {
|
|
|
| class WebServiceWorkerRegistration;
|
| -struct WebPushError;
|
| -struct WebPushSubscription;
|
| struct WebPushSubscriptionOptions;
|
|
|
| -using WebPushSubscriptionCallbacks = WebCallbacks<WebPushSubscription*, WebPushError*>;
|
| -using WebPushPermissionStatusCallbacks = WebCallbacks<WebPushPermissionStatus*, WebPushError*>;
|
| +class WebPushSubscriptionCallbacks : public WebCallbacks<WebPassOwnPtr<WebPushSubscription>, const WebPushError&> {
|
| +public:
|
| + void onSuccess(WebPushSubscription* r)
|
| + {
|
| + onSuccess(adoptWebPtr(r));
|
| + }
|
| + void onError(WebPushError* e)
|
| + {
|
| + onError(*e);
|
| + delete e;
|
| + }
|
| + void onSuccess(WebPassOwnPtr<WebPushSubscription>) override {}
|
| + void onError(const WebPushError&) override {}
|
| +};
|
| +class WebPushPermissionStatusCallbacks : public WebCallbacks<WebPushPermissionStatus, const WebPushError&> {
|
| +public:
|
| + void onSuccess(WebPushPermissionStatus* r)
|
| + {
|
| + onSuccess(*r);
|
| + }
|
| + void onError(WebPushError* e)
|
| + {
|
| + onError(*e);
|
| + delete e;
|
| + }
|
| + void onSuccess(WebPushPermissionStatus) override {}
|
| + void onError(const WebPushError&) override {}
|
| +};
|
| using WebPushUnsubscribeCallbacks = WebCallbacks<bool, const WebPushError&>;
|
|
|
| class WebPushProvider {
|
|
|