| 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_IMPL_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 // Completes the GCM store destroy request. | 277 // Completes the GCM store destroy request. |
| 278 void OnGCMStoreDestroyed(bool success); | 278 void OnGCMStoreDestroyed(bool success); |
| 279 | 279 |
| 280 // Handles incoming data message and dispatches it the delegate of this class. | 280 // Handles incoming data message and dispatches it the delegate of this class. |
| 281 void HandleIncomingMessage(const gcm::MCSMessage& message); | 281 void HandleIncomingMessage(const gcm::MCSMessage& message); |
| 282 | 282 |
| 283 // Fires OnMessageReceived event on the delegate of this class, based on the | 283 // Fires OnMessageReceived event on the delegate of this class, based on the |
| 284 // details in |data_message_stanza| and |message_data|. | 284 // details in |data_message_stanza| and |message_data|. |
| 285 void HandleIncomingDataMessage( | 285 void HandleIncomingDataMessage( |
| 286 const std::string& app_id, |
| 287 bool use_subtype, |
| 286 const mcs_proto::DataMessageStanza& data_message_stanza, | 288 const mcs_proto::DataMessageStanza& data_message_stanza, |
| 287 MessageData& message_data); | 289 MessageData& message_data); |
| 288 | 290 |
| 289 // Fires OnMessageSendError event on the delegate of this calss, based on the | 291 // Fires OnMessageSendError event on the delegate of this calss, based on the |
| 290 // details in |data_message_stanza| and |message_data|. | 292 // details in |data_message_stanza| and |message_data|. |
| 291 void HandleIncomingSendError( | 293 void HandleIncomingSendError( |
| 294 const std::string& app_id, |
| 292 const mcs_proto::DataMessageStanza& data_message_stanza, | 295 const mcs_proto::DataMessageStanza& data_message_stanza, |
| 293 MessageData& message_data); | 296 MessageData& message_data); |
| 294 | 297 |
| 295 // Is there any standalone app being registered for GCM? | 298 // Is there any standalone app being registered for GCM? |
| 296 bool HasStandaloneRegisteredApp() const; | 299 bool HasStandaloneRegisteredApp() const; |
| 297 | 300 |
| 298 // Destroys the store when it is not needed. | 301 // Destroys the store when it is not needed. |
| 299 void DestroyStoreWhenNotNeeded(); | 302 void DestroyStoreWhenNotNeeded(); |
| 300 | 303 |
| 301 // Reset all cahced values. | 304 // Reset all cahced values. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 | 382 |
| 380 // Factory for creating references in callbacks. | 383 // Factory for creating references in callbacks. |
| 381 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; | 384 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; |
| 382 | 385 |
| 383 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); | 386 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); |
| 384 }; | 387 }; |
| 385 | 388 |
| 386 } // namespace gcm | 389 } // namespace gcm |
| 387 | 390 |
| 388 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 391 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
| OLD | NEW |