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

Unified Diff: base/android/jni_array.h

Issue 7518032: Android's paths and message loop implementation with JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dependence again. Created 9 years, 5 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: base/android/jni_array.h
diff --git a/base/android/jni_array.h b/base/android/jni_array.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad732560f73f23b861d868db9b7f6bf46bcd8d94
--- /dev/null
+++ b/base/android/jni_array.h
@@ -0,0 +1,25 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+// Author: michaelbai@google.com (Tao Bai)
+
+
+#ifndef BASE_ANDROID_JNI_ARRAY_H_
+#define BASE_ANDROID_JNI_ARRAY_H_
+
+#include <jni.h>
+#include <string>
+#include <vector>
+
+namespace base {
+namespace android {
+
+// Returns a new Java byte array converted from the given bytes array.
+jbyteArray ToJavaByteArray(JNIEnv* env, const unsigned char* bytes, size_t len);
+
+// Returns a array of Java byte array converted from |v|.
+jobjectArray ToJavaArrayOfByteArray(JNIEnv* env,
+ const std::vector<std::string>& v);
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_JNI_ARRAY_H_

Powered by Google App Engine
This is Rietveld 408576698