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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 return 0; | 74 return 0; |
75 } | 75 } |
76 | 76 |
77 static jfloat GetFloatFunction(JNIEnv*, jclass) { | 77 static jfloat GetFloatFunction(JNIEnv*, jclass) { |
78 return 0; | 78 return 0; |
79 } | 79 } |
80 | 80 |
81 static void SetNonPODDatatype(JNIEnv*, jobject, jobject) { | 81 static void SetNonPODDatatype(JNIEnv*, jobject, jobject) { |
82 } | 82 } |
83 | 83 |
84 static jobject GetNonPODDatatype(JNIEnv*, jobject) { | 84 static ScopedJavaLocalRef<jobject> GetNonPODDatatype(JNIEnv*, jobject) { |
85 return NULL; | 85 return ScopedJavaLocalRef<jobject>(); |
86 } | 86 } |
87 | 87 |
88 static jint InnerFunction(JNIEnv*, jclass) { | 88 static jint InnerFunction(JNIEnv*, jclass) { |
89 return 0; | 89 return 0; |
90 } | 90 } |
91 | 91 |
92 } // namespace android | 92 } // namespace android |
93 } // namespace base | 93 } // namespace base |
94 | 94 |
95 int main() { | 95 int main() { |
(...skipping 15 matching lines...) Expand all Loading... |
111 ScopedJavaLocalRef<jobject> struct_a = | 111 ScopedJavaLocalRef<jobject> struct_a = |
112 base::android::Java_InnerStructA_create( | 112 base::android::Java_InnerStructA_create( |
113 env, 0, 1, | 113 env, 0, 1, |
114 base::android::ConvertUTF8ToJavaString(env, "test").obj()); | 114 base::android::ConvertUTF8ToJavaString(env, "test").obj()); |
115 base::android::Java_SampleForTests_addStructA( | 115 base::android::Java_SampleForTests_addStructA( |
116 env, my_java_object, struct_a.obj()); | 116 env, my_java_object, struct_a.obj()); |
117 } | 117 } |
118 base::android::Java_SampleForTests_iterateAndDoSomething(env, my_java_object); | 118 base::android::Java_SampleForTests_iterateAndDoSomething(env, my_java_object); |
119 return 0; | 119 return 0; |
120 } | 120 } |
OLD | NEW |