Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Unified Diff: Source/modules/push_messaging/PushSubscriptionCallbacks.h

Issue 1304723002: [PushMessaging] Use appopriate type parameters for WebCallbacks (1/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/push_messaging/PushSubscriptionCallbacks.h
diff --git a/Source/modules/push_messaging/PushSubscriptionCallbacks.h b/Source/modules/push_messaging/PushSubscriptionCallbacks.h
index 55d00da7edd09fbd8fae569d7a10d8cb13e0cb17..c9244875b16d48ab822bc7a6a498f9223c54b293 100644
--- a/Source/modules/push_messaging/PushSubscriptionCallbacks.h
+++ b/Source/modules/push_messaging/PushSubscriptionCallbacks.h
@@ -6,7 +6,7 @@
#define PushSubscriptionCallbacks_h
#include "platform/heap/Handle.h"
-#include "public/platform/WebCallbacks.h"
+#include "public/platform/modules/push_messaging/WebPushProvider.h"
#include "wtf/Noncopyable.h"
namespace blink {
@@ -20,14 +20,14 @@ struct WebPushSubscription;
// that will resolve the underlying promise depending on the result passed to
// the callback. It takes a ServiceWorkerRegistration in its constructor and
// will pass it to the PushSubscription.
-class PushSubscriptionCallbacks final : public WebCallbacks<WebPushSubscription*, WebPushError*> {
+class PushSubscriptionCallbacks final : public WebPushSubscriptionCallbacks {
WTF_MAKE_NONCOPYABLE(PushSubscriptionCallbacks);
public:
PushSubscriptionCallbacks(ScriptPromiseResolver*, ServiceWorkerRegistration*);
~PushSubscriptionCallbacks() override;
- void onSuccess(WebPushSubscription*) override;
- void onError(WebPushError*) override;
+ void onSuccess(WebPassOwnPtr<WebPushSubscription>) override;
+ void onError(const WebPushError&) override;
private:
Persistent<ScriptPromiseResolver> m_resolver;
« no previous file with comments | « Source/modules/push_messaging/PushSubscription.cpp ('k') | Source/modules/push_messaging/PushSubscriptionCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698