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 CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "chrome/browser/background/background_trigger.h" | 19 #include "chrome/browser/background/background_trigger.h" |
20 #include "components/content_settings/core/browser/content_settings_observer.h" | 20 #include "components/content_settings/core/browser/content_settings_observer.h" |
21 #include "components/content_settings/core/common/content_settings.h" | 21 #include "components/content_settings/core/common/content_settings.h" |
22 #include "components/gcm_driver/common/gcm_messages.h" | 22 #include "components/gcm_driver/common/gcm_messages.h" |
23 #include "components/gcm_driver/gcm_app_handler.h" | 23 #include "components/gcm_driver/gcm_app_handler.h" |
24 #include "components/gcm_driver/gcm_client.h" | 24 #include "components/gcm_driver/gcm_client.h" |
25 #include "components/keyed_service/core/keyed_service.h" | 25 #include "components/keyed_service/core/keyed_service.h" |
26 #include "components/permissions/permission_status.mojom.h" | |
27 #include "content/public/browser/push_messaging_service.h" | 26 #include "content/public/browser/push_messaging_service.h" |
28 #include "content/public/common/push_event_payload.h" | 27 #include "content/public/common/push_event_payload.h" |
29 #include "content/public/common/push_messaging_status.h" | 28 #include "content/public/common/push_messaging_status.h" |
| 29 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat
us.mojom.h" |
30 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
ssionStatus.h" | 30 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
ssionStatus.h" |
31 | 31 |
32 #if defined(ENABLE_NOTIFICATIONS) | 32 #if defined(ENABLE_NOTIFICATIONS) |
33 #include "chrome/browser/push_messaging/push_messaging_notification_manager.h" | 33 #include "chrome/browser/push_messaging/push_messaging_notification_manager.h" |
34 #endif | 34 #endif |
35 | 35 |
36 class Profile; | 36 class Profile; |
37 class PushMessagingAppIdentifier; | 37 class PushMessagingAppIdentifier; |
38 class PushMessagingServiceObserver; | 38 class PushMessagingServiceObserver; |
39 struct PushSubscriptionOptions; | 39 struct PushSubscriptionOptions; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 const PushMessagingAppIdentifier& app_identifier, | 161 const PushMessagingAppIdentifier& app_identifier, |
162 const content::PushMessagingService::RegisterCallback& callback, | 162 const content::PushMessagingService::RegisterCallback& callback, |
163 const std::string& subscription_id, | 163 const std::string& subscription_id, |
164 const std::string& p256dh, | 164 const std::string& p256dh, |
165 const std::string& auth_secret); | 165 const std::string& auth_secret); |
166 | 166 |
167 void DidRequestPermission( | 167 void DidRequestPermission( |
168 const PushMessagingAppIdentifier& app_identifier, | 168 const PushMessagingAppIdentifier& app_identifier, |
169 const content::PushSubscriptionOptions& options, | 169 const content::PushSubscriptionOptions& options, |
170 const content::PushMessagingService::RegisterCallback& callback, | 170 const content::PushMessagingService::RegisterCallback& callback, |
171 permissions::mojom::PermissionStatus permission_status); | 171 blink::mojom::PermissionStatus permission_status); |
172 | 172 |
173 // GetEncryptionInfo method -------------------------------------------------- | 173 // GetEncryptionInfo method -------------------------------------------------- |
174 | 174 |
175 void DidGetEncryptionInfo( | 175 void DidGetEncryptionInfo( |
176 const PushMessagingService::EncryptionInfoCallback& callback, | 176 const PushMessagingService::EncryptionInfoCallback& callback, |
177 const std::string& p256dh, | 177 const std::string& p256dh, |
178 const std::string& auth_secret) const; | 178 const std::string& auth_secret) const; |
179 | 179 |
180 // Unsubscribe methods ------------------------------------------------------- | 180 // Unsubscribe methods ------------------------------------------------------- |
181 | 181 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 std::unique_ptr<PushMessagingServiceObserver> | 244 std::unique_ptr<PushMessagingServiceObserver> |
245 push_messaging_service_observer_; | 245 push_messaging_service_observer_; |
246 | 246 |
247 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; | 247 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |
248 | 248 |
249 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); | 249 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |
250 }; | 250 }; |
251 | 251 |
252 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ | 252 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
OLD | NEW |