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

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: 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..9afd95e801d85bbae8a8cd86c715f3f09fd96cca 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 ContentPushSubscriptionOptions;
// 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,25 +50,25 @@ 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.
- 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 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.
- virtual void SubscribeFromWorker(const GURL& requesting_origin,
- int64_t service_worker_registration_id,
- const std::string& sender_id,
- bool user_visible,
- const RegisterCallback& callback) = 0;
+ // 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,
+ int renderer_id,
+ int render_frame_id,
+ const ContentPushSubscriptionOptions& options,
+ const RegisterCallback& callback) = 0;
+
+ // 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 ContentPushSubscriptionOptions& options,
+ const RegisterCallback& callback) = 0;
// Retrieves the encryption information associated with the subscription
// associated to |origin| and |service_worker_registration_id|.

Powered by Google App Engine
This is Rietveld 408576698