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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 const GURL& embedding_origin) override; | 73 const GURL& embedding_origin) override; |
74 | 74 |
75 void SetProfileForTesting(Profile* profile); | 75 void SetProfileForTesting(Profile* profile); |
76 | 76 |
77 private: | 77 private: |
78 void IncreasePushRegistrationCount(int add); | 78 void IncreasePushRegistrationCount(int add); |
79 void DecreasePushRegistrationCount(int subtract); | 79 void DecreasePushRegistrationCount(int subtract); |
80 | 80 |
81 void DeliverMessageCallback(const PushMessagingApplicationId& application_id, | 81 void DeliverMessageCallback(const PushMessagingApplicationId& application_id, |
82 const GCMClient::IncomingMessage& message, | 82 const GCMClient::IncomingMessage& message, |
83 int notification_count_before_event, | |
83 content::PushDeliveryStatus status); | 84 content::PushDeliveryStatus status); |
84 | 85 |
86 void RequireUserVisibleUX(const PushMessagingApplicationId& application_id, | |
Peter Beverloo
2015/01/09 17:58:21
Even though this is private, it would be great if
johnme
2015/01/09 18:28:47
Done.
| |
87 int notification_count_before_event); | |
88 | |
85 void RegisterEnd( | 89 void RegisterEnd( |
86 const content::PushMessagingService::RegisterCallback& callback, | 90 const content::PushMessagingService::RegisterCallback& callback, |
87 const std::string& registration_id, | 91 const std::string& registration_id, |
88 content::PushRegistrationStatus status); | 92 content::PushRegistrationStatus status); |
89 | 93 |
90 void DidRegister( | 94 void DidRegister( |
91 const content::PushMessagingService::RegisterCallback& callback, | 95 const content::PushMessagingService::RegisterCallback& callback, |
92 const std::string& registration_id, | 96 const std::string& registration_id, |
93 GCMClient::Result result); | 97 GCMClient::Result result); |
94 | 98 |
(...skipping 23 matching lines...) Expand all Loading... | |
118 int push_registration_count_; | 122 int push_registration_count_; |
119 | 123 |
120 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; | 124 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |
121 | 125 |
122 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); | 126 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |
123 }; | 127 }; |
124 | 128 |
125 } // namespace gcm | 129 } // namespace gcm |
126 | 130 |
127 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 131 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
OLD | NEW |