OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Replaces the content of |out| with the Java ints in |int_array|. | 56 // Replaces the content of |out| with the Java ints in |int_array|. |
57 BASE_EXPORT void JavaIntArrayToIntVector( | 57 BASE_EXPORT void JavaIntArrayToIntVector( |
58 JNIEnv* env, | 58 JNIEnv* env, |
59 jintArray int_array, | 59 jintArray int_array, |
60 std::vector<int>* out); | 60 std::vector<int>* out); |
61 | 61 |
62 // Assuming |array| is an byte[][] (array of byte arrays), replaces the | 62 // Assuming |array| is an byte[][] (array of byte arrays), replaces the |
63 // content of |out| with the corresponding vector of strings. No UTF-8 | 63 // content of |out| with the corresponding vector of strings. No UTF-8 |
64 // conversion is performed. | 64 // conversion is performed. |
65 void JavaArrayOfByteArrayToStringVector( | 65 BASE_EXPORT void JavaArrayOfByteArrayToStringVector( |
66 JNIEnv* env, | 66 JNIEnv* env, |
67 jobjectArray array, | 67 jobjectArray array, |
68 std::vector<std::string>* out); | 68 std::vector<std::string>* out); |
69 | 69 |
70 } // namespace android | 70 } // namespace android |
71 } // namespace base | 71 } // namespace base |
72 | 72 |
73 #endif // BASE_ANDROID_JNI_ARRAY_H_ | 73 #endif // BASE_ANDROID_JNI_ARRAY_H_ |
OLD | NEW |