OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_IMPL_INVALIDATION_SERVICE_ANDROID_H_ | 5 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ |
6 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ | 6 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace invalidation { | 23 namespace invalidation { |
24 | 24 |
25 class InvalidationLogger; | 25 class InvalidationLogger; |
26 | 26 |
27 // This InvalidationService is used to deliver invalidations on Android. The | 27 // This InvalidationService is used to deliver invalidations on Android. The |
28 // Android operating system has its own mechanisms for delivering invalidations. | 28 // Android operating system has its own mechanisms for delivering invalidations. |
29 class InvalidationServiceAndroid | 29 class InvalidationServiceAndroid |
30 : public base::NonThreadSafe, | 30 : public base::NonThreadSafe, |
31 public InvalidationService { | 31 public InvalidationService { |
32 public: | 32 public: |
33 explicit InvalidationServiceAndroid(); | 33 explicit InvalidationServiceAndroid( |
| 34 const base::android::JavaRef<jobject>& context); |
34 ~InvalidationServiceAndroid() override; | 35 ~InvalidationServiceAndroid() override; |
35 | 36 |
36 // InvalidationService implementation. | 37 // InvalidationService implementation. |
37 // | 38 // |
38 // Note that this implementation does not properly support Ack-tracking, | 39 // Note that this implementation does not properly support Ack-tracking, |
39 // fetching the invalidator state, or querying the client's ID. Support for | 40 // fetching the invalidator state, or querying the client's ID. Support for |
40 // exposing the client ID should be available soon; see crbug.com/172391. | 41 // exposing the client ID should be available soon; see crbug.com/172391. |
41 void RegisterInvalidationHandler( | 42 void RegisterInvalidationHandler( |
42 syncer::InvalidationHandler* handler) override; | 43 syncer::InvalidationHandler* handler) override; |
43 bool UpdateRegisteredInvalidationIds(syncer::InvalidationHandler* handler, | 44 bool UpdateRegisteredInvalidationIds(syncer::InvalidationHandler* handler, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // The invalidation logger object we use to record state changes | 87 // The invalidation logger object we use to record state changes |
87 // and invalidations. | 88 // and invalidations. |
88 InvalidationLogger logger_; | 89 InvalidationLogger logger_; |
89 | 90 |
90 DISALLOW_COPY_AND_ASSIGN(InvalidationServiceAndroid); | 91 DISALLOW_COPY_AND_ASSIGN(InvalidationServiceAndroid); |
91 }; | 92 }; |
92 | 93 |
93 } // namespace invalidation | 94 } // namespace invalidation |
94 | 95 |
95 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ | 96 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ |
OLD | NEW |