Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1515)

Unified Diff: chrome/browser/invalidation/invalidation_controller_android.h

Issue 23643002: Enable invalidations for arbitrary objects on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/invalidation/DEPS ('k') | chrome/browser/invalidation/invalidation_controller_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/invalidation/invalidation_controller_android.h
diff --git a/chrome/browser/invalidation/invalidation_controller_android.h b/chrome/browser/invalidation/invalidation_controller_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..72d115b64e36c96e94b655aead509fc2d43d4e2c
--- /dev/null
+++ b/chrome/browser/invalidation/invalidation_controller_android.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_INVALIDATION_INVALIDATION_CONTROLLER_ANDROID_H_
+#define CHROME_BROWSER_INVALIDATION_INVALIDATION_CONTROLLER_ANDROID_H_
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_helper.h"
+#include "sync/notifier/invalidation_util.h"
+
+namespace invalidation {
+
+// Controls invalidation registration on Android. This class is a wrapper for
+// the Java class org.chromium.sync.notifier.InvalidationController.
+class InvalidationControllerAndroid {
+ public:
+ InvalidationControllerAndroid();
+ virtual ~InvalidationControllerAndroid();
+
+ // Sets object ids for which the invalidation client should register for
+ // notification.
+ virtual void SetRegisteredObjectIds(const syncer::ObjectIdSet& ids);
+
+ private:
+ // The Java invalidation controller.
+ base::android::ScopedJavaGlobalRef<jobject> invalidation_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(InvalidationControllerAndroid);
+};
+
+bool RegisterInvalidationController(JNIEnv* env);
+
+} // namespace invalidation
+
+#endif // CHROME_BROWSER_INVALIDATION_INVALIDATION_CONTROLLER_ANDROID_H_
« no previous file with comments | « chrome/browser/invalidation/DEPS ('k') | chrome/browser/invalidation/invalidation_controller_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698