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