OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file is autogenerated by | 5 // This file is autogenerated by |
6 // base/android/jni_generator/jni_generator.py | 6 // base/android/jni_generator/jni_generator.py |
7 // For | 7 // For |
8 // org/chromium/example/jni_generator/Test | 8 // org/chromium/example/jni_generator/Test |
9 | 9 |
10 #ifndef org_chromium_example_jni_generator_Test_JNI | 10 #ifndef org_chromium_example_jni_generator_Test_JNI |
(...skipping 18 matching lines...) Expand all Loading... |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 // Step 2: method stubs. | 31 // Step 2: method stubs. |
32 static jint Java_org_chromium_example_jni_1generator_Test_nativeMethod(JNIEnv* | 32 static jint Java_org_chromium_example_jni_1generator_Test_nativeMethod(JNIEnv* |
33 env, | 33 env, |
34 jobject jcaller, | 34 jobject jcaller, |
35 jlong nativeTest, | 35 jlong nativeTest, |
36 jint arg1) { | 36 jint arg1) { |
37 Test* native = reinterpret_cast<Test*>(nativeTest); | 37 Test* native = reinterpret_cast<Test*>(nativeTest); |
38 CHECK_NATIVE_PTR(env, jcaller, native, "Method", 0); | 38 CHECK_NATIVE_PTR(env, jcaller, native, "Method", 0); |
39 return native->Method(env, jcaller, arg1); | 39 return native->Method(env, JavaParamRef<jobject>(env, jcaller), arg1); |
40 } | 40 } |
41 | 41 |
42 namespace { | 42 namespace { |
43 | 43 |
44 static void testMethodWithParam(JNIEnv* env, jobject obj, JniIntWrapper iParam) | 44 static void testMethodWithParam(JNIEnv* env, jobject obj, JniIntWrapper iParam) |
45 { | 45 { |
46 env->CallVoidMethod(obj, | 46 env->CallVoidMethod(obj, |
47 g_Test_testMethodWithParam, as_jint(iParam)); | 47 g_Test_testMethodWithParam, as_jint(iParam)); |
48 | 48 |
49 } | 49 } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 return true; | 140 return true; |
141 } | 141 } |
142 | 142 |
143 extern "C" JNIEXPORT bool JNICALL | 143 extern "C" JNIEXPORT bool JNICALL |
144 Java_org_chromium_example_jni_generator_Test_nativeInitNativeClass(JNIEnv* env, | 144 Java_org_chromium_example_jni_generator_Test_nativeInitNativeClass(JNIEnv* env, |
145 jclass clazz) { | 145 jclass clazz) { |
146 return RegisterNativesImpl(env, clazz); | 146 return RegisterNativesImpl(env, clazz); |
147 } | 147 } |
148 | 148 |
149 #endif // org_chromium_example_jni_generator_Test_JNI | 149 #endif // org_chromium_example_jni_generator_Test_JNI |
OLD | NEW |