| 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> |
| 11 | 11 |
| 12 #include "base/android/scoped_java_ref.h" | 12 #include "base/android/scoped_java_ref.h" |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/string16.h" | 14 #include "base/strings/string16.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 namespace android { | 17 namespace android { |
| 18 | 18 |
| 19 // Returns a new Java byte array converted from the given bytes array. | 19 // Returns a new Java byte array converted from the given bytes array. |
| 20 BASE_EXPORT ScopedJavaLocalRef<jbyteArray> ToJavaByteArray( | 20 BASE_EXPORT ScopedJavaLocalRef<jbyteArray> ToJavaByteArray( |
| 21 JNIEnv* env, const uint8* bytes, size_t len); | 21 JNIEnv* env, const uint8* bytes, size_t len); |
| 22 | 22 |
| 23 // Returns a new Java long array converted from the given int64 array. | 23 // Returns a new Java long array converted from the given int64 array. |
| 24 BASE_EXPORT ScopedJavaLocalRef<jlongArray> ToJavaLongArray( | 24 BASE_EXPORT ScopedJavaLocalRef<jlongArray> ToJavaLongArray( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // conversion is performed. | 77 // conversion is performed. |
| 78 BASE_EXPORT void JavaArrayOfByteArrayToStringVector( | 78 BASE_EXPORT void JavaArrayOfByteArrayToStringVector( |
| 79 JNIEnv* env, | 79 JNIEnv* env, |
| 80 jobjectArray array, | 80 jobjectArray array, |
| 81 std::vector<std::string>* out); | 81 std::vector<std::string>* out); |
| 82 | 82 |
| 83 } // namespace android | 83 } // namespace android |
| 84 } // namespace base | 84 } // namespace base |
| 85 | 85 |
| 86 #endif // BASE_ANDROID_JNI_ARRAY_H_ | 86 #endif // BASE_ANDROID_JNI_ARRAY_H_ |
| OLD | NEW |