| 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 // A simple wrapper around invalidation::InvalidationClient that | 5 // A simple wrapper around invalidation::InvalidationClient that |
| 6 // handles all the startup/shutdown details and hookups. | 6 // handles all the startup/shutdown details and hookups. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_INVALIDATION_IMPL_SYNC_INVALIDATION_LISTENER_H_ | 8 #ifndef COMPONENTS_INVALIDATION_IMPL_SYNC_INVALIDATION_LISTENER_H_ |
| 9 #define COMPONENTS_INVALIDATION_IMPL_SYNC_INVALIDATION_LISTENER_H_ | 9 #define COMPONENTS_INVALIDATION_IMPL_SYNC_INVALIDATION_LISTENER_H_ |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class PushClient; | 33 class PushClient; |
| 34 } // namespace notifier | 34 } // namespace notifier |
| 35 | 35 |
| 36 namespace syncer { | 36 namespace syncer { |
| 37 | 37 |
| 38 class ObjectIdInvalidationMap; | 38 class ObjectIdInvalidationMap; |
| 39 class RegistrationManager; | 39 class RegistrationManager; |
| 40 | 40 |
| 41 // SyncInvalidationListener is not thread-safe and lives on the sync | 41 // SyncInvalidationListener is not thread-safe and lives on the sync |
| 42 // thread. | 42 // thread. |
| 43 class INVALIDATION_EXPORT_PRIVATE SyncInvalidationListener | 43 class INVALIDATION_EXPORT SyncInvalidationListener |
| 44 : public NON_EXPORTED_BASE(invalidation::InvalidationListener), | 44 : public NON_EXPORTED_BASE(invalidation::InvalidationListener), |
| 45 public StateWriter, | 45 public StateWriter, |
| 46 public SyncNetworkChannel::Observer, | 46 public SyncNetworkChannel::Observer, |
| 47 public AckHandler, | 47 public AckHandler, |
| 48 public base::NonThreadSafe { | 48 public base::NonThreadSafe { |
| 49 public: | 49 public: |
| 50 typedef base::Callback<invalidation::InvalidationClient*( | 50 typedef base::Callback<invalidation::InvalidationClient*( |
| 51 invalidation::SystemResources*, | 51 invalidation::SystemResources*, |
| 52 int, | 52 int, |
| 53 const invalidation::string&, | 53 const invalidation::string&, |
| 54 const invalidation::string&, | 54 const invalidation::string&, |
| 55 invalidation::InvalidationListener*)> CreateInvalidationClientCallback; | 55 invalidation::InvalidationListener*)> CreateInvalidationClientCallback; |
| 56 | 56 |
| 57 class INVALIDATION_EXPORT_PRIVATE Delegate { | 57 class INVALIDATION_EXPORT Delegate { |
| 58 public: | 58 public: |
| 59 virtual ~Delegate(); | 59 virtual ~Delegate(); |
| 60 | 60 |
| 61 virtual void OnInvalidate( | 61 virtual void OnInvalidate( |
| 62 const ObjectIdInvalidationMap& invalidations) = 0; | 62 const ObjectIdInvalidationMap& invalidations) = 0; |
| 63 | 63 |
| 64 virtual void OnInvalidatorStateChange(InvalidatorState state) = 0; | 64 virtual void OnInvalidatorStateChange(InvalidatorState state) = 0; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 explicit SyncInvalidationListener( | 67 explicit SyncInvalidationListener( |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 InvalidatorState push_client_state_; | 183 InvalidatorState push_client_state_; |
| 184 | 184 |
| 185 base::WeakPtrFactory<SyncInvalidationListener> weak_ptr_factory_; | 185 base::WeakPtrFactory<SyncInvalidationListener> weak_ptr_factory_; |
| 186 | 186 |
| 187 DISALLOW_COPY_AND_ASSIGN(SyncInvalidationListener); | 187 DISALLOW_COPY_AND_ASSIGN(SyncInvalidationListener); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 } // namespace syncer | 190 } // namespace syncer |
| 191 | 191 |
| 192 #endif // COMPONENTS_INVALIDATION_IMPL_SYNC_INVALIDATION_LISTENER_H_ | 192 #endif // COMPONENTS_INVALIDATION_IMPL_SYNC_INVALIDATION_LISTENER_H_ |
| OLD | NEW |