| 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 #include "base/android/jni_generator/sample_for_tests.h" | 5 #include "base/android/jni_generator/sample_for_tests.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 // Generated file for JNI bindings from C++ to Java @CalledByNative methods. | 10 // Generated file for JNI bindings from C++ to Java @CalledByNative methods. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 return 0; | 75 return 0; |
| 76 } | 76 } |
| 77 | 77 |
| 78 static jfloat GetFloatFunction(JNIEnv*, jclass) { | 78 static jfloat GetFloatFunction(JNIEnv*, jclass) { |
| 79 return 0; | 79 return 0; |
| 80 } | 80 } |
| 81 | 81 |
| 82 static void SetNonPODDatatype(JNIEnv*, jobject, jobject) { | 82 static void SetNonPODDatatype(JNIEnv*, jobject, jobject) { |
| 83 } | 83 } |
| 84 | 84 |
| 85 static jobject GetNonPODDatatype(JNIEnv*, jobject) { | 85 static ScopedJavaLocalRef<jobject> GetNonPODDatatype(JNIEnv*, jobject) { |
| 86 return NULL; | 86 return ScopedJavaLocalRef<jobject>(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 static jint InnerFunction(JNIEnv*, jclass) { | 89 static jint InnerFunction(JNIEnv*, jclass) { |
| 90 return 0; | 90 return 0; |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace android | 93 } // namespace android |
| 94 } // namespace base | 94 } // namespace base |
| 95 | 95 |
| 96 int main() { | 96 int main() { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 112 ScopedJavaLocalRef<jobject> struct_a = | 112 ScopedJavaLocalRef<jobject> struct_a = |
| 113 base::android::Java_InnerStructA_create( | 113 base::android::Java_InnerStructA_create( |
| 114 env, 0, 1, | 114 env, 0, 1, |
| 115 base::android::ConvertUTF8ToJavaString(env, "test").obj()); | 115 base::android::ConvertUTF8ToJavaString(env, "test").obj()); |
| 116 base::android::Java_SampleForTests_addStructA( | 116 base::android::Java_SampleForTests_addStructA( |
| 117 env, my_java_object, struct_a.obj()); | 117 env, my_java_object, struct_a.obj()); |
| 118 } | 118 } |
| 119 base::android::Java_SampleForTests_iterateAndDoSomething(env, my_java_object); | 119 base::android::Java_SampleForTests_iterateAndDoSomething(env, my_java_object); |
| 120 return 0; | 120 return 0; |
| 121 } | 121 } |
| OLD | NEW |