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

Unified Diff: components/gcm_driver/android/component_jni_registrar.cc

Issue 285203005: Hook components/gcm_driver up to JNI Generator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, and add GCMDriver.java to fix compile Created 6 years, 7 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
Index: components/gcm_driver/android/component_jni_registrar.cc
diff --git a/components/gcm_driver/android/component_jni_registrar.cc b/components/gcm_driver/android/component_jni_registrar.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0ac8265b6ccadc1cf53d98376a7b56133f473087
--- /dev/null
+++ b/components/gcm_driver/android/component_jni_registrar.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 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.
+
+#include "components/gcm_driver/android/component_jni_registrar.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "base/basictypes.h"
+#include "components/gcm_driver/gcm_driver_android.h"
+
+namespace gcm {
+
+namespace android {
+
+static base::android::RegistrationMethod kGCMDriverRegisteredMethods[] = {
+ {"GCMDriver", gcm::GCMDriverAndroid::RegisterBindings},
+};
+
+bool RegisterGCMDriverJni(JNIEnv* env) {
+ return base::android::RegisterNativeMethods(
+ env,
+ kGCMDriverRegisteredMethods,
+ arraysize(kGCMDriverRegisteredMethods));
+}
+
+} // namespace android
+
+} // namespace gcm_driver
jianli 2014/05/15 19:05:26 nit: in a few places you have inconsistency in the
johnme 2014/05/15 19:29:42 Done (just here; I couldn't find any other places?

Powered by Google App Engine
This is Rietveld 408576698