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 15 matching lines...) Expand all Loading... |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 // Step 2: method stubs. | 28 // Step 2: method stubs. |
29 static jint Java_org_chromium_example_jni_1generator_Test_nativeMethod(JNIEnv* | 29 static jint Java_org_chromium_example_jni_1generator_Test_nativeMethod(JNIEnv* |
30 env, | 30 env, |
31 jobject jcaller, | 31 jobject jcaller, |
32 jlong nativeTest, | 32 jlong nativeTest, |
33 jint arg1) { | 33 jint arg1) { |
34 Test* native = reinterpret_cast<Test*>(nativeTest); | 34 Test* native = reinterpret_cast<Test*>(nativeTest); |
35 CHECK_NATIVE_PTR(env, jcaller, native, "Method", 0); | 35 CHECK_NATIVE_PTR(env, jcaller, native, "Method", 0); |
36 return native->Method(env, jcaller, arg1); | 36 return native->Method(env, JavaParamRef<jobject>(env, jcaller), arg1); |
37 } | 37 } |
38 | 38 |
39 // Step 3: RegisterNatives. | 39 // Step 3: RegisterNatives. |
40 | 40 |
41 static const JNINativeMethod kMethodsTest[] = { | 41 static const JNINativeMethod kMethodsTest[] = { |
42 { "nativeMethod", | 42 { "nativeMethod", |
43 "(" | 43 "(" |
44 "J" | 44 "J" |
45 "I" | 45 "I" |
46 ")" | 46 ")" |
(...skipping 19 matching lines...) Expand all Loading... |
66 return true; | 66 return true; |
67 } | 67 } |
68 | 68 |
69 extern "C" JNIEXPORT bool JNICALL | 69 extern "C" JNIEXPORT bool JNICALL |
70 Java_org_chromium_example_jni_generator_Test_nativeInitNativeClass(JNIEnv* env, | 70 Java_org_chromium_example_jni_generator_Test_nativeInitNativeClass(JNIEnv* env, |
71 jclass clazz) { | 71 jclass clazz) { |
72 return RegisterNativesImpl(env, clazz); | 72 return RegisterNativesImpl(env, clazz); |
73 } | 73 } |
74 | 74 |
75 #endif // org_chromium_example_jni_generator_Test_JNI | 75 #endif // org_chromium_example_jni_generator_Test_JNI |
OLD | NEW |