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

Unified Diff: content/renderer/push_messaging_dispatcher.h

Issue 661463002: Implement PushManager#hasPermission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: content/renderer/push_messaging_dispatcher.h
diff --git a/content/renderer/push_messaging_dispatcher.h b/content/renderer/push_messaging_dispatcher.h
index 080510fc6c63edd7c67c90ea8791d93fdae0c466..b18ab9fd9b55545f7ec47f90c1e6aa1f62c56493 100644
--- a/content/renderer/push_messaging_dispatcher.h
+++ b/content/renderer/push_messaging_dispatcher.h
@@ -11,6 +11,7 @@
#include "content/public/common/push_messaging_status.h"
#include "content/public/renderer/render_frame_observer.h"
#include "third_party/WebKit/public/platform/WebPushClient.h"
+#include "third_party/WebKit/public/platform/WebPushPermissionStatus.h"
class GURL;
@@ -19,6 +20,7 @@ class Message;
} // namespace IPC
namespace blink {
+class WebPushPermissionCallback;
class WebServiceWorkerProvider;
class WebString;
} // namespace blink
@@ -41,7 +43,11 @@ class PushMessagingDispatcher : public RenderFrameObserver,
virtual void registerPushMessaging(
const blink::WebString& sender_id,
blink::WebPushRegistrationCallbacks* callbacks,
- blink::WebServiceWorkerProvider* service_worker_provider);
+ blink::WebServiceWorkerProvider* service_worker_provider) /* override */;
+
+ virtual void getPermissionStatus(
+ blink::WebPushPermissionCallback* callback,
+ blink::WebServiceWorkerProvider* service_worker_provider) /* override */;
void DoRegister(const std::string& sender_id,
blink::WebPushRegistrationCallbacks* callbacks,
@@ -54,8 +60,16 @@ class PushMessagingDispatcher : public RenderFrameObserver,
void OnRegisterError(int32 callbacks_id, PushRegistrationStatus status);
+ void OnPermissionStatus(
+ int32 callback_id,
+ blink::WebPushPermissionStatus);
+
+
IDMap<blink::WebPushRegistrationCallbacks, IDMapOwnPointer>
registration_callbacks_;
+ IDMap<blink::WebPushPermissionCallback, IDMapOwnPointer>
+ permission_check_callbacks_;
+
DISALLOW_COPY_AND_ASSIGN(PushMessagingDispatcher);
};

Powered by Google App Engine
This is Rietveld 408576698