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

Unified Diff: mojo/android/system/mojo_jni_registrar.cc

Issue 2784493003: Consolidate JNI registrations for mojo system. (Closed)
Patch Set: Rebase only Created 3 years, 9 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 | « mojo/android/system/mojo_jni_registrar.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/android/system/mojo_jni_registrar.cc
diff --git a/mojo/android/system/mojo_jni_registrar.cc b/mojo/android/system/mojo_jni_registrar.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2a6c34eee0e9bf286e3c8fdd9cabc141fa789317
--- /dev/null
+++ b/mojo/android/system/mojo_jni_registrar.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2017 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 "mojo/android/system/mojo_jni_registrar.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "mojo/android/system/core_impl.h"
+#include "mojo/android/system/watcher_impl.h"
+
+namespace mojo {
+namespace android {
+
+static base::android::RegistrationMethod kMojoRegisteredMethods[] = {
+ {"CoreImpl", mojo::android::RegisterCoreImpl},
+ {"WatcherImpl", mojo::android::RegisterWatcherImpl},
+};
+
+bool RegisterSystemJni(JNIEnv* env) {
+ return base::android::RegisterNativeMethods(
+ env, kMojoRegisteredMethods, arraysize(kMojoRegisteredMethods));
+}
+
+} // namespace android
+} // namespace mojo
« no previous file with comments | « mojo/android/system/mojo_jni_registrar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698