Chromium Code Reviews| 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 COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 void DoGetToken(const std::string& app_id, | 150 void DoGetToken(const std::string& app_id, |
| 151 const std::string& authorized_entity, | 151 const std::string& authorized_entity, |
| 152 const std::string& scope, | 152 const std::string& scope, |
| 153 const std::map<std::string, std::string>& options); | 153 const std::map<std::string, std::string>& options); |
| 154 void DoDeleteToken(const std::string& app_id, | 154 void DoDeleteToken(const std::string& app_id, |
| 155 const std::string& authorized_entity, | 155 const std::string& authorized_entity, |
| 156 const std::string& scope); | 156 const std::string& scope); |
| 157 | 157 |
| 158 // Callbacks posted from IO thread to UI thread. | 158 // Callbacks posted from IO thread to UI thread. |
| 159 void MessageReceived(const std::string& app_id, | 159 void MessageReceived(const std::string& app_id, |
| 160 const IncomingMessage& message); | 160 const IncomingMessage& message, |
| 161 const MessageReceiptCallback& receipt_callback); | |
| 161 void MessagesDeleted(const std::string& app_id); | 162 void MessagesDeleted(const std::string& app_id); |
| 162 void MessageSendError(const std::string& app_id, | 163 void MessageSendError(const std::string& app_id, |
| 163 const GCMClient::SendErrorDetails& send_error_details); | 164 const GCMClient::SendErrorDetails& send_error_details); |
| 164 void SendAcknowledged(const std::string& app_id, | 165 void SendAcknowledged(const std::string& app_id, |
| 165 const std::string& message_id); | 166 const std::string& message_id); |
| 166 void GCMClientReady(const std::vector<AccountMapping>& account_mappings, | 167 void GCMClientReady(const std::vector<AccountMapping>& account_mappings, |
| 167 const base::Time& last_token_fetch_time); | 168 const base::Time& last_token_fetch_time); |
| 168 void OnConnected(const net::IPEndPoint& ip_endpoint); | 169 void OnConnected(const net::IPEndPoint& ip_endpoint); |
| 169 void OnDisconnected(); | 170 void OnDisconnected(); |
| 170 void OnStoreReset(); | 171 void OnStoreReset(); |
| 171 | 172 |
| 172 void GetGCMStatisticsFinished(const GCMClient::GCMStatistics& stats); | 173 void GetGCMStatisticsFinished(const GCMClient::GCMStatistics& stats); |
| 173 void GetInstanceIDDataFinished(const std::string& app_id, | 174 void GetInstanceIDDataFinished(const std::string& app_id, |
| 174 const std::string& instance_id, | 175 const std::string& instance_id, |
| 175 const std::string& extra_data); | 176 const std::string& extra_data); |
| 176 void GetTokenFinished(const std::string& app_id, | 177 void GetTokenFinished(const std::string& app_id, |
| 177 const std::string& authorized_entity, | 178 const std::string& authorized_entity, |
| 178 const std::string& scope, | 179 const std::string& scope, |
| 179 const std::string& token, | 180 const std::string& token, |
| 180 GCMClient::Result result); | 181 GCMClient::Result result); |
| 181 void DeleteTokenFinished(const std::string& app_id, | 182 void DeleteTokenFinished(const std::string& app_id, |
| 182 const std::string& authorized_entity, | 183 const std::string& authorized_entity, |
| 183 const std::string& scope, | 184 const std::string& scope, |
| 184 GCMClient::Result result); | 185 GCMClient::Result result); |
| 185 | 186 |
| 187 void DoSendMessageReceipt(const MessageReceiptCallback& receipt_callback, | |
| 188 GCMMessageStatus status); | |
|
Peter Beverloo
2017/02/13 13:47:07
Please add this around line 157.
harkness
2017/02/14 19:22:29
Done.
| |
| 189 | |
| 186 std::unique_ptr<GCMChannelStatusSyncer> gcm_channel_status_syncer_; | 190 std::unique_ptr<GCMChannelStatusSyncer> gcm_channel_status_syncer_; |
| 187 | 191 |
| 188 // Flag to indicate whether the user is signed in to a GAIA account. | 192 // Flag to indicate whether the user is signed in to a GAIA account. |
| 189 bool signed_in_; | 193 bool signed_in_; |
| 190 | 194 |
| 191 // Flag to indicate if GCM is started. | 195 // Flag to indicate if GCM is started. |
| 192 bool gcm_started_; | 196 bool gcm_started_; |
| 193 | 197 |
| 194 // Flag to indicate if GCM is enabled. | 198 // Flag to indicate if GCM is enabled. |
| 195 bool gcm_enabled_; | 199 bool gcm_enabled_; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 236 | 240 |
| 237 // Used to pass a weak pointer to the IO worker. | 241 // Used to pass a weak pointer to the IO worker. |
| 238 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 242 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
| 239 | 243 |
| 240 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 244 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
| 241 }; | 245 }; |
| 242 | 246 |
| 243 } // namespace gcm | 247 } // namespace gcm |
| 244 | 248 |
| 245 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 249 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| OLD | NEW |