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 CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/public/common/push_messaging_status.h" | 14 #include "content/public/common/push_messaging_status.h" |
15 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
ssionStatus.h" | 15 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
ssionStatus.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class BrowserContext; | 20 class BrowserContext; |
21 class ServiceWorkerContext; | |
22 struct PushSubscriptionOptions; | 21 struct PushSubscriptionOptions; |
23 | 22 |
24 // A push service-agnostic interface that the Push API uses for talking to | 23 // A push service-agnostic interface that the Push API uses for talking to |
25 // push messaging services like GCM. Must only be used on the UI thread. | 24 // push messaging services like GCM. Must only be used on the UI thread. |
26 class CONTENT_EXPORT PushMessagingService { | 25 class CONTENT_EXPORT PushMessagingService { |
27 public: | 26 public: |
28 using RegisterCallback = | 27 using RegisterCallback = |
29 base::Callback<void(const std::string& registration_id, | 28 base::Callback<void(const std::string& registration_id, |
30 const std::vector<uint8_t>& p256dh, | 29 const std::vector<uint8_t>& p256dh, |
31 const std::vector<uint8_t>& auth, | 30 const std::vector<uint8_t>& auth, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const GURL& origin, | 114 const GURL& origin, |
116 int64_t service_worker_registration_id, | 115 int64_t service_worker_registration_id, |
117 const std::string& subscription_id, | 116 const std::string& subscription_id, |
118 const std::string& sender_id, | 117 const std::string& sender_id, |
119 const base::Closure& callback); | 118 const base::Closure& callback); |
120 }; | 119 }; |
121 | 120 |
122 } // namespace content | 121 } // namespace content |
123 | 122 |
124 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ | 123 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ |
OLD | NEW |