#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 {
public:
typedef base::Callback<void(const GURL& /* endpoint */,
const std::string& /* registration_id */,
- PushMessagingStatus /* status */)>
+ PushRegistrationStatus /* status */)>
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,
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