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

Unified Diff: content/public/browser/push_messaging_service.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
« no previous file with comments | « content/common/push_messaging_messages.h ('k') | content/renderer/push_messaging_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/push_messaging_service.h
diff --git a/content/public/browser/push_messaging_service.h b/content/public/browser/push_messaging_service.h
index 5154febd053765aabd1994dffcd0c4503feec144..d0cd124a823949f449da1f9c3d01ebcdaf880018 100644
--- a/content/public/browser/push_messaging_service.h
+++ b/content/public/browser/push_messaging_service.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "content/common/content_export.h"
#include "content/public/common/push_messaging_status.h"
+#include "third_party/WebKit/public/platform/WebPushPermissionStatus.h"
#include "url/gurl.h"
namespace content {
@@ -24,6 +25,8 @@ class CONTENT_EXPORT PushMessagingService {
RegisterCallback;
virtual ~PushMessagingService() {}
+
+ // Register the given |sender_id| with GCM.
virtual void Register(const GURL& origin,
int64 service_worker_registration_id,
const std::string& sender_id,
@@ -31,6 +34,13 @@ class CONTENT_EXPORT PushMessagingService {
int render_frame_id,
bool user_gesture,
const RegisterCallback& callback) = 0;
+
+ // Check whether the requester has permission to register for Push
+ // Messages
+ virtual blink::WebPushPermissionStatus GetPermissionStatus(
+ const GURL& requesting_origin,
+ int renderer_id,
+ int render_frame_id) = 0;
};
} // namespace content
« no previous file with comments | « content/common/push_messaging_messages.h ('k') | content/renderer/push_messaging_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698