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

Unified Diff: content/public/browser/push_messaging_service.h

Issue 1701313002: Partial implementation of subscription restrictions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed broken file Created 4 years, 10 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/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 31163d4b3a19214167d91aa5aae1766103b35670..3d98f4af78cfb3a2c6f39eef1e7826e6bd568a9f 100644
--- a/content/public/browser/push_messaging_service.h
+++ b/content/public/browser/push_messaging_service.h
@@ -19,6 +19,7 @@ namespace content {
class BrowserContext;
class ServiceWorkerContext;
+struct PushSubscriptionOptions;
// A push service-agnostic interface that the Push API uses for talking to
// push messaging services like GCM. Must only be used on the UI thread.
@@ -49,24 +50,22 @@ class CONTENT_EXPORT PushMessagingService {
// origins and push registrations.
virtual GURL GetPushEndpoint() = 0;
- // Subscribe the given |sender_id| with the push messaging service in a
- // document context. The frame is known and a permission UI may be displayed
- // to the user.
+ // Subscribe the given |options.sender_info| with the push messaging service
+ // in a document context. The frame is known and a permission UI may be
+ // displayed to the user.
virtual void SubscribeFromDocument(const GURL& requesting_origin,
int64_t service_worker_registration_id,
- const std::string& sender_id,
int renderer_id,
int render_frame_id,
- bool user_visible,
+ const PushSubscriptionOptions& options,
const RegisterCallback& callback) = 0;
- // Subscribe the given |sender_id| with the push messaging service. The frame
- // is not known so if permission was not previously granted by the user this
- // request should fail.
+ // Subscribe the given |options.sender_info| with the push messaging service.
+ // The frame is not known so if permission was not previously granted by the
+ // user this request should fail.
virtual void SubscribeFromWorker(const GURL& requesting_origin,
int64_t service_worker_registration_id,
- const std::string& sender_id,
- bool user_visible,
+ const PushSubscriptionOptions& options,
const RegisterCallback& callback) = 0;
// Retrieves the encryption information associated with the subscription

Powered by Google App Engine
This is Rietveld 408576698