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

Side by Side Diff: third_party/WebKit/public/platform/modules/push_messaging/WebPushProvider.h

Issue 2935333003: Propagate the user gesture bit when requesting push messaging permission. (Closed)
Patch Set: ThreadSafe user gesture check Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebPushProvider_h 5 #ifndef WebPushProvider_h
6 #define WebPushProvider_h 6 #define WebPushProvider_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/modules/push_messaging/WebPushPermissionStatus.h" 9 #include "public/platform/modules/push_messaging/WebPushPermissionStatus.h"
10 #include "public/platform/modules/push_messaging/WebPushSubscription.h" 10 #include "public/platform/modules/push_messaging/WebPushSubscription.h"
(...skipping 13 matching lines...) Expand all
24 using WebPushUnsubscribeCallbacks = WebCallbacks<bool, const WebPushError&>; 24 using WebPushUnsubscribeCallbacks = WebCallbacks<bool, const WebPushError&>;
25 25
26 class WebPushProvider { 26 class WebPushProvider {
27 public: 27 public:
28 virtual ~WebPushProvider() {} 28 virtual ~WebPushProvider() {}
29 29
30 // Takes ownership of the WebPushSubscriptionCallbacks. 30 // Takes ownership of the WebPushSubscriptionCallbacks.
31 // Does not take ownership of the WebServiceWorkerRegistration. 31 // Does not take ownership of the WebServiceWorkerRegistration.
32 virtual void Subscribe(WebServiceWorkerRegistration*, 32 virtual void Subscribe(WebServiceWorkerRegistration*,
33 const WebPushSubscriptionOptions&, 33 const WebPushSubscriptionOptions&,
34 bool user_gesture,
34 std::unique_ptr<WebPushSubscriptionCallbacks>) = 0; 35 std::unique_ptr<WebPushSubscriptionCallbacks>) = 0;
35 36
36 // Takes ownership of the WebPushSubscriptionCallbacks. 37 // Takes ownership of the WebPushSubscriptionCallbacks.
37 // Does not take ownership of the WebServiceWorkerRegistration. 38 // Does not take ownership of the WebServiceWorkerRegistration.
38 virtual void GetSubscription( 39 virtual void GetSubscription(
39 WebServiceWorkerRegistration*, 40 WebServiceWorkerRegistration*,
40 std::unique_ptr<WebPushSubscriptionCallbacks>) = 0; 41 std::unique_ptr<WebPushSubscriptionCallbacks>) = 0;
41 42
42 // Takes ownership of the WebPushPermissionStatusCallbacks. 43 // Takes ownership of the WebPushPermissionStatusCallbacks.
43 // Does not take ownership of the WebServiceWorkerRegistration. 44 // Does not take ownership of the WebServiceWorkerRegistration.
44 virtual void GetPermissionStatus( 45 virtual void GetPermissionStatus(
45 WebServiceWorkerRegistration*, 46 WebServiceWorkerRegistration*,
46 const WebPushSubscriptionOptions&, 47 const WebPushSubscriptionOptions&,
47 std::unique_ptr<WebPushPermissionStatusCallbacks>) = 0; 48 std::unique_ptr<WebPushPermissionStatusCallbacks>) = 0;
48 49
49 // Takes ownership if the WebPushUnsubscribeCallbacks. 50 // Takes ownership if the WebPushUnsubscribeCallbacks.
50 // Does not take ownership of the WebServiceWorkerRegistration. 51 // Does not take ownership of the WebServiceWorkerRegistration.
51 virtual void Unsubscribe(WebServiceWorkerRegistration*, 52 virtual void Unsubscribe(WebServiceWorkerRegistration*,
52 std::unique_ptr<WebPushUnsubscribeCallbacks>) = 0; 53 std::unique_ptr<WebPushUnsubscribeCallbacks>) = 0;
53 }; 54 };
54 55
55 } // namespace blink 56 } // namespace blink
56 57
57 #endif // WebPushProvider_h 58 #endif // WebPushProvider_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698