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

Unified Diff: remoting/host/android/jni_host.cc

Issue 1867433002: [remoting android] Add native library and JNI glue for host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: remoting/host/android/jni_host.cc
diff --git a/remoting/host/android/jni_host.cc b/remoting/host/android/jni_host.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b57e17f1d5fa79370d9d5759a51b4421cd1df231
--- /dev/null
+++ b/remoting/host/android/jni_host.cc
@@ -0,0 +1,28 @@
+// Copyright 2016 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 "remoting/host/android/jni_host.h"
+
+#include "jni/Host_jni.h"
+
+namespace remoting {
+
+JniHost::JniHost() {}
+
+JniHost::~JniHost() {}
+
+// static
+bool JniHost::RegisterJni(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+void JniHost::Destroy(JNIEnv* env, const JavaParamRef<jobject>& caller) {
+ delete this;
+}
+
+static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& caller) {
+ return reinterpret_cast<intptr_t>(new JniHost());
+}
+
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698