| 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_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ | 5 #ifndef COMPONENTS_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ |
| 6 #define COMPONENTS_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ | 6 #define COMPONENTS_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // gcm::GCMAppHandler implementation. | 51 // gcm::GCMAppHandler implementation. |
| 52 virtual void ShutdownHandler() OVERRIDE; | 52 virtual void ShutdownHandler() OVERRIDE; |
| 53 virtual void OnMessage( | 53 virtual void OnMessage( |
| 54 const std::string& app_id, | 54 const std::string& app_id, |
| 55 const gcm::GCMClient::IncomingMessage& message) OVERRIDE; | 55 const gcm::GCMClient::IncomingMessage& message) OVERRIDE; |
| 56 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; | 56 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; |
| 57 virtual void OnSendError( | 57 virtual void OnSendError( |
| 58 const std::string& app_id, | 58 const std::string& app_id, |
| 59 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; | 59 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; |
| 60 virtual void OnSendAcknowledged(const std::string& app_id, |
| 61 const std::string& message_id) OVERRIDE; |
| 60 virtual void OnConnected(const net::IPEndPoint& ip_endpoint) OVERRIDE; | 62 virtual void OnConnected(const net::IPEndPoint& ip_endpoint) OVERRIDE; |
| 61 virtual void OnDisconnected() OVERRIDE; | 63 virtual void OnDisconnected() OVERRIDE; |
| 62 | 64 |
| 63 scoped_ptr<syncer::GCMNetworkChannelDelegate> CreateDelegate(); | 65 scoped_ptr<syncer::GCMNetworkChannelDelegate> CreateDelegate(); |
| 64 | 66 |
| 65 void CoreInitializationDone( | 67 void CoreInitializationDone( |
| 66 base::WeakPtr<Core> core, | 68 base::WeakPtr<Core> core, |
| 67 scoped_refptr<base::SingleThreadTaskRunner> core_thread_task_runner); | 69 scoped_refptr<base::SingleThreadTaskRunner> core_thread_task_runner); |
| 68 | 70 |
| 69 // Functions reflecting GCMNetworkChannelDelegate interface. These are called | 71 // Functions reflecting GCMNetworkChannelDelegate interface. These are called |
| (...skipping 25 matching lines...) Expand all Loading... |
| 95 bool subscribed_for_incoming_messages_; | 97 bool subscribed_for_incoming_messages_; |
| 96 | 98 |
| 97 base::WeakPtrFactory<GCMInvalidationBridge> weak_factory_; | 99 base::WeakPtrFactory<GCMInvalidationBridge> weak_factory_; |
| 98 | 100 |
| 99 DISALLOW_COPY_AND_ASSIGN(GCMInvalidationBridge); | 101 DISALLOW_COPY_AND_ASSIGN(GCMInvalidationBridge); |
| 100 }; | 102 }; |
| 101 | 103 |
| 102 } // namespace invalidation | 104 } // namespace invalidation |
| 103 | 105 |
| 104 #endif // COMPONENTS_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ | 106 #endif // COMPONENTS_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ |
| OLD | NEW |