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

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

Issue 2133673002: Push API: Implement and ship PushSubscription.options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698