| 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_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "components/content_settings/core/browser/content_settings_observer.h" | 10 #include "components/content_settings/core/browser/content_settings_observer.h" |
| 11 #include "components/content_settings/core/common/content_settings.h" |
| 11 #include "components/gcm_driver/gcm_app_handler.h" | 12 #include "components/gcm_driver/gcm_app_handler.h" |
| 12 #include "components/gcm_driver/gcm_client.h" | 13 #include "components/gcm_driver/gcm_client.h" |
| 13 #include "content/public/browser/push_messaging_service.h" | 14 #include "content/public/browser/push_messaging_service.h" |
| 14 #include "content/public/common/push_messaging_status.h" | 15 #include "content/public/common/push_messaging_status.h" |
| 15 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
ssionStatus.h" | 16 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
ssionStatus.h" |
| 16 | 17 |
| 17 class Profile; | 18 class Profile; |
| 18 | 19 |
| 19 namespace user_prefs { | 20 namespace user_prefs { |
| 20 class PrefRegistrySyncable; | 21 class PrefRegistrySyncable; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 void DidRegister( | 123 void DidRegister( |
| 123 const PushMessagingApplicationId& application_id, | 124 const PushMessagingApplicationId& application_id, |
| 124 const content::PushMessagingService::RegisterCallback& callback, | 125 const content::PushMessagingService::RegisterCallback& callback, |
| 125 const std::string& registration_id, | 126 const std::string& registration_id, |
| 126 GCMClient::Result result); | 127 GCMClient::Result result); |
| 127 | 128 |
| 128 void DidRequestPermission( | 129 void DidRequestPermission( |
| 129 const PushMessagingApplicationId& application_id, | 130 const PushMessagingApplicationId& application_id, |
| 130 const std::string& sender_id, | 131 const std::string& sender_id, |
| 131 const content::PushMessagingService::RegisterCallback& callback, | 132 const content::PushMessagingService::RegisterCallback& callback, |
| 132 bool allow); | 133 ContentSetting content_setting); |
| 133 | 134 |
| 134 // Unregister methods -------------------------------------------------------- | 135 // Unregister methods -------------------------------------------------------- |
| 135 | 136 |
| 136 void Unregister(const std::string& app_id_guid, | 137 void Unregister(const std::string& app_id_guid, |
| 137 const std::string& sender_id, | 138 const std::string& sender_id, |
| 138 bool retry_on_failure, | 139 bool retry_on_failure, |
| 139 const content::PushMessagingService::UnregisterCallback&); | 140 const content::PushMessagingService::UnregisterCallback&); |
| 140 | 141 |
| 141 void DidUnregister(const std::string& app_id_guid, | 142 void DidUnregister(const std::string& app_id_guid, |
| 142 bool retry_on_failure, | 143 bool retry_on_failure, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 162 int pending_push_registration_count_; | 163 int pending_push_registration_count_; |
| 163 | 164 |
| 164 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; | 165 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |
| 165 | 166 |
| 166 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); | 167 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |
| 167 }; | 168 }; |
| 168 | 169 |
| 169 } // namespace gcm | 170 } // namespace gcm |
| 170 | 171 |
| 171 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 172 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| OLD | NEW |