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

Unified Diff: public/platform/modules/push_messaging/WebPushProvider.h

Issue 1130233003: Reject the permissionState promise with NotSupported Exception (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « public/platform/modules/push_messaging/WebPushError.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47fe52241424ddfffb68fcbdcd3df70796f465f8..07ed3d1bd1759d1fe48d3d0e0172542508c405df 100644
--- a/public/platform/modules/push_messaging/WebPushProvider.h
+++ b/public/platform/modules/push_messaging/WebPushProvider.h
@@ -16,9 +16,21 @@ struct WebPushSubscription;
struct WebPushSubscriptionOptions;
using WebPushSubscriptionCallbacks = WebCallbacks<WebPushSubscription, WebPushError>;
-using WebPushPermissionStatusCallbacks = WebCallbacks<WebPushPermissionStatus, void>;
+using WebPushPermissionStatusCallbacksOriginal = WebCallbacks<WebPushPermissionStatus, WebPushError>;
using WebPushUnsubscribeCallbacks = WebCallbacks<bool, WebPushError>;
+// TODO(miguelg): Remove this and rename WebPushPermissionStatusCallbacksOriginal to WebPushPermissionStatusCallbacks
+// once blinks rolls into chrome and the embedder is fixed to use onError(WebPushError*)
+class WebPushPermissionStatusCallbacks : public WebPushPermissionStatusCallbacksOriginal {
+public:
+ // This method is obsolete and replacedby onError(WebPushError*)
+ virtual void onError() = 0;
+
+ // WebPushPermissionStatusCallbacksOriginal:
+ virtual void onSuccess(WebPushPermissionStatus*) = 0;
+ virtual void onError(WebPushError*) = 0;
+};
+
class WebPushProvider {
public:
virtual ~WebPushProvider() { }
« no previous file with comments | « public/platform/modules/push_messaging/WebPushError.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698