| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 // Callbacks posted from IO thread to UI thread. | 114 // Callbacks posted from IO thread to UI thread. |
| 115 void RegisterFinished(const std::string& app_id, | 115 void RegisterFinished(const std::string& app_id, |
| 116 const std::string& registration_id, | 116 const std::string& registration_id, |
| 117 GCMClient::Result result); | 117 GCMClient::Result result); |
| 118 void UnregisterFinished(const std::string& app_id, GCMClient::Result result); | 118 void UnregisterFinished(const std::string& app_id, GCMClient::Result result); |
| 119 void SendFinished(const std::string& app_id, | 119 void SendFinished(const std::string& app_id, |
| 120 const std::string& message_id, | 120 const std::string& message_id, |
| 121 GCMClient::Result result); | 121 GCMClient::Result result); |
| 122 void MessageReceived(const std::string& app_id, | 122 void MessageReceived(const std::string& app_id, |
| 123 GCMClient::IncomingMessage message); | 123 const GCMClient::IncomingMessage& message); |
| 124 void MessagesDeleted(const std::string& app_id); | 124 void MessagesDeleted(const std::string& app_id); |
| 125 void MessageSendError(const std::string& app_id, | 125 void MessageSendError(const std::string& app_id, |
| 126 const GCMClient::SendErrorDetails& send_error_details); | 126 const GCMClient::SendErrorDetails& send_error_details); |
| 127 void GCMClientReady(); | 127 void GCMClientReady(); |
| 128 | 128 |
| 129 void GetGCMStatisticsFinished(GCMClient::GCMStatistics stats); | 129 void GetGCMStatisticsFinished(const GCMClient::GCMStatistics& stats); |
| 130 | 130 |
| 131 // Flag to indicate if GCM is enabled. | 131 // Flag to indicate if GCM is enabled. |
| 132 bool gcm_enabled_; | 132 bool gcm_enabled_; |
| 133 | 133 |
| 134 // Flag to indicate if GCMClient is ready. | 134 // Flag to indicate if GCMClient is ready. |
| 135 bool gcm_client_ready_; | 135 bool gcm_client_ready_; |
| 136 | 136 |
| 137 // The account ID that this service is responsible for. Empty when the service | 137 // The account ID that this service is responsible for. Empty when the service |
| 138 // is not running. | 138 // is not running. |
| 139 std::string account_id_; | 139 std::string account_id_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 162 | 162 |
| 163 // Used to pass a weak pointer to the IO worker. | 163 // Used to pass a weak pointer to the IO worker. |
| 164 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 164 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
| 165 | 165 |
| 166 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 166 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 } // namespace gcm | 169 } // namespace gcm |
| 170 | 170 |
| 171 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 171 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| OLD | NEW |