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

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 e0c5c99136cdc1edc797354f1e0b0247b52a1252..15a6b2487f68cfaf6d5844a7dcd0d1b354265efe 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/WebPushPermissionCallback.h"
class GURL;
@@ -19,6 +20,7 @@ class Message;
} // namespace IPC
namespace blink {
+class WebPushPermissionCallback;
Michael van Ouwerkerk 2014/10/20 16:30:08 No need as you already included it.
Miguel Garcia 2014/10/22 16:35:27 Done (as in I don't include it anymore)
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 */;
Michael van Ouwerkerk 2014/10/20 16:30:08 Not sure what the common form is for indicating ov
Miguel Garcia 2014/10/22 16:35:27 So I would prefer to leave it uncommnented but tha
+
+ virtual void permissionStatus(
+ 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, PushMessagingStatus status);
+ void OnPermissionStatus(
+ int32 callback_id,
+ blink::WebPushPermissionCallback::PushPermissionStatus);
+
+
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