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/gcm_driver/gcm_app_handler.h" | 10 #include "components/gcm_driver/gcm_app_handler.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 bool user_visible_only, | 60 bool user_visible_only, |
61 const content::PushMessagingService::RegisterCallback& callback) override; | 61 const content::PushMessagingService::RegisterCallback& callback) override; |
62 void RegisterFromWorker( | 62 void RegisterFromWorker( |
63 const GURL& requesting_origin, | 63 const GURL& requesting_origin, |
64 int64 service_worker_registration_id, | 64 int64 service_worker_registration_id, |
65 const std::string& sender_id, | 65 const std::string& sender_id, |
66 const content::PushMessagingService::RegisterCallback& callback) override; | 66 const content::PushMessagingService::RegisterCallback& callback) override; |
67 void Unregister( | 67 void Unregister( |
68 const GURL& requesting_origin, | 68 const GURL& requesting_origin, |
69 int64 service_worker_registration_id, | 69 int64 service_worker_registration_id, |
| 70 const std::string& sender_id, |
70 const content::PushMessagingService::UnregisterCallback&) override; | 71 const content::PushMessagingService::UnregisterCallback&) override; |
71 blink::WebPushPermissionStatus GetPermissionStatus( | 72 blink::WebPushPermissionStatus GetPermissionStatus( |
72 const GURL& requesting_origin, | 73 const GURL& requesting_origin, |
73 const GURL& embedding_origin) override; | 74 const GURL& embedding_origin) override; |
74 | 75 |
75 void SetProfileForTesting(Profile* profile); | 76 void SetProfileForTesting(Profile* profile); |
76 | 77 |
77 private: | 78 private: |
78 // A registration is pending until it has succeeded or failed. | 79 // A registration is pending until it has succeeded or failed. |
79 void IncreasePushRegistrationCount(int add, bool is_pending); | 80 void IncreasePushRegistrationCount(int add, bool is_pending); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 int pending_push_registration_count_; | 130 int pending_push_registration_count_; |
130 | 131 |
131 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; | 132 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |
132 | 133 |
133 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); | 134 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |
134 }; | 135 }; |
135 | 136 |
136 } // namespace gcm | 137 } // namespace gcm |
137 | 138 |
138 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 139 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
OLD | NEW |