OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_ANDROID_JNI_ARRAY_H_ | 5 #ifndef BASE_ANDROID_JNI_ARRAY_H_ |
6 #define BASE_ANDROID_JNI_ARRAY_H_ | 6 #define BASE_ANDROID_JNI_ARRAY_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 namespace android { | 13 namespace android { |
14 | 14 |
15 // Returns a new Java byte array converted from the given bytes array. | 15 // Returns a new Java byte array converted from the given bytes array. |
16 jbyteArray ToJavaByteArray(JNIEnv* env, const unsigned char* bytes, size_t len); | 16 jbyteArray ToJavaByteArray(JNIEnv* env, const unsigned char* bytes, size_t len); |
17 | 17 |
18 // Returns a array of Java byte array converted from |v|. | 18 // Returns a array of Java byte array converted from |v|. |
19 jobjectArray ToJavaArrayOfByteArray(JNIEnv* env, | 19 jobjectArray ToJavaArrayOfByteArray(JNIEnv* env, |
20 const std::vector<std::string>& v); | 20 const std::vector<std::string>& v); |
21 | 21 |
| 22 jobjectArray ToJavaArrayOfStrings(JNIEnv* env, |
| 23 const std::vector<std::string>& v); |
| 24 |
22 } // namespace android | 25 } // namespace android |
23 } // namespace base | 26 } // namespace base |
24 | 27 |
25 #endif // BASE_ANDROID_JNI_ARRAY_H_ | 28 #endif // BASE_ANDROID_JNI_ARRAY_H_ |
OLD | NEW |