OLD | NEW |
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 WebPushSubscription_h | 5 #ifndef WebPushSubscription_h |
6 #define WebPushSubscription_h | 6 #define WebPushSubscription_h |
7 | 7 |
8 #include "public/platform/WebCommon.h" | 8 #include "public/platform/WebCommon.h" |
9 #include "public/platform/WebURL.h" | 9 #include "public/platform/WebURL.h" |
10 #include "public/platform/WebVector.h" | 10 #include "public/platform/WebVector.h" |
| 11 #include "public/platform/modules/push_messaging/WebPushSubscriptionOptions.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 struct WebPushSubscription { | 15 struct WebPushSubscription { |
15 // The |endpoint|, |p256dh| and |auth| must all be unique for each subscript
ion. | 16 // The |endpoint|, |p256dh| and |auth| must all be unique for each subscript
ion. |
16 WebPushSubscription(const WebURL& endpoint, const WebVector<unsigned char>&
p256dh, const WebVector<unsigned char>& auth) | 17 WebPushSubscription(const WebURL& endpoint, bool userVisibleOnly, const WebS
tring& applicationServerKey, |
| 18 const WebVector<unsigned char>& p256dh, const WebVector<unsigned char>&
auth) |
17 : endpoint(endpoint) | 19 : endpoint(endpoint) |
18 , p256dh(p256dh) | 20 , p256dh(p256dh) |
19 , auth(auth) | 21 , auth(auth) |
20 { | 22 { |
| 23 options.userVisibleOnly = userVisibleOnly; |
| 24 options.applicationServerKey = applicationServerKey; |
21 } | 25 } |
22 | 26 |
23 WebURL endpoint; | 27 WebURL endpoint; |
| 28 WebPushSubscriptionOptions options; |
24 WebVector<unsigned char> p256dh; | 29 WebVector<unsigned char> p256dh; |
25 WebVector<unsigned char> auth; | 30 WebVector<unsigned char> auth; |
26 }; | 31 }; |
27 | 32 |
28 } // namespace blink | 33 } // namespace blink |
29 | 34 |
30 #endif // WebPushSubscription_h | 35 #endif // WebPushSubscription_h |
OLD | NEW |