| 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_CLIENT_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // |app_id|: application ID. | 177 // |app_id|: application ID. |
| 178 virtual void OnMessagesDeleted(const std::string& app_id) = 0; | 178 virtual void OnMessagesDeleted(const std::string& app_id) = 0; |
| 179 | 179 |
| 180 // Called when a message failed to send to the server. | 180 // Called when a message failed to send to the server. |
| 181 // |app_id|: application ID. | 181 // |app_id|: application ID. |
| 182 // |send_error_detials|: Details of the send error event, like mesasge ID. | 182 // |send_error_detials|: Details of the send error event, like mesasge ID. |
| 183 virtual void OnMessageSendError( | 183 virtual void OnMessageSendError( |
| 184 const std::string& app_id, | 184 const std::string& app_id, |
| 185 const SendErrorDetails& send_error_details) = 0; | 185 const SendErrorDetails& send_error_details) = 0; |
| 186 | 186 |
| 187 // Called when a message was acknowledged by the GCM server. |
| 188 // |app_id|: application ID. |
| 189 // |message_id|: ID of the acknowledged message. |
| 190 virtual void OnSendAcknowledged(const std::string& app_id, |
| 191 const std::string& message_id) = 0; |
| 192 |
| 187 // Called when the GCM becomes ready. To get to this state, GCMClient | 193 // Called when the GCM becomes ready. To get to this state, GCMClient |
| 188 // finished loading from the GCM store and retrieved the device check-in | 194 // finished loading from the GCM store and retrieved the device check-in |
| 189 // from the server if it hadn't yet. | 195 // from the server if it hadn't yet. |
| 190 virtual void OnGCMReady() = 0; | 196 virtual void OnGCMReady() = 0; |
| 191 | 197 |
| 192 // Called when activities are being recorded and a new activity has just | 198 // Called when activities are being recorded and a new activity has just |
| 193 // been recorded. | 199 // been recorded. |
| 194 virtual void OnActivityRecorded() = 0; | 200 virtual void OnActivityRecorded() = 0; |
| 195 | 201 |
| 196 // Called when a new connection is established and a successful handshake | 202 // Called when a new connection is established and a successful handshake |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 274 |
| 269 // Sets a list of accounts with OAuth2 tokens for the next checkin. | 275 // Sets a list of accounts with OAuth2 tokens for the next checkin. |
| 270 // |account_tokens| maps email addresses to OAuth2 access tokens. | 276 // |account_tokens| maps email addresses to OAuth2 access tokens. |
| 271 virtual void SetAccountsForCheckin( | 277 virtual void SetAccountsForCheckin( |
| 272 const std::map<std::string, std::string>& account_tokens) = 0; | 278 const std::map<std::string, std::string>& account_tokens) = 0; |
| 273 }; | 279 }; |
| 274 | 280 |
| 275 } // namespace gcm | 281 } // namespace gcm |
| 276 | 282 |
| 277 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 283 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| OLD | NEW |