| 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/SampleForTests | 8 // org/chromium/example/jni_generator/SampleForTests |
| 9 | 9 |
| 10 #ifndef org_chromium_example_jni_generator_SampleForTests_JNI | 10 #ifndef org_chromium_example_jni_generator_SampleForTests_JNI |
| 11 #define org_chromium_example_jni_generator_SampleForTests_JNI | 11 #define org_chromium_example_jni_generator_SampleForTests_JNI |
| 12 | 12 |
| 13 #include <jni.h> | 13 #include <jni.h> |
| 14 | 14 |
| 15 #include "base/android/jni_generator/jni_generator_helper.h" | 15 #include "base/android/jni_generator/jni_generator_helper.h" |
| 16 | 16 |
| 17 #include "base/android/jni_int_wrapper.h" | 17 #include "base/android/jni_int_wrapper.h" |
| 18 | 18 |
| 19 // Step 1: forward declarations. | 19 // Step 1: forward declarations. |
| 20 namespace { | 20 namespace { |
| 21 const char kSampleForTestsClassPath[] = | 21 const char kSampleForTestsClassPath[] = |
| 22 "org/chromium/example/jni_generator/SampleForTests"; | 22 "org/chromium/example/jni_generator/SampleForTests"; |
| 23 // Leaking this jclass as we cannot use LazyInstance from some threads. | 23 // Leaking this jclass as we cannot use LazyInstance from some threads. |
| 24 base::subtle::AtomicWord g_SampleForTests_clazz = 0; | 24 base::subtle::AtomicWord g_SampleForTests_clazz __attribute__((unused)) = 0; |
| 25 #define SampleForTests_clazz(env) base::android::LazyGetClass(env, kSampleForTes
tsClassPath, &g_SampleForTests_clazz) | 25 #define SampleForTests_clazz(env) base::android::LazyGetClass(env, kSampleForTes
tsClassPath, &g_SampleForTests_clazz) |
| 26 | 26 |
| 27 } // namespace | 27 } // namespace |
| 28 | 28 |
| 29 extern "C" { | 29 extern "C" { |
| 30 | 30 |
| 31 static jint Init(JNIEnv* env, jobject jcaller); | 31 static jint Init(JNIEnv* env, jobject jcaller); |
| 32 | 32 |
| 33 __attribute__((visibility("default"))) | 33 __attribute__((visibility("default"), alias("Init"))) |
| 34 jint | 34 jint |
| 35 Java_org_chromium_example_jni_1generator_SampleForTests_00024MyInnerClass_na
tiveInit(JNIEnv* | 35 Java_org_chromium_example_jni_1generator_SampleForTests_00024MyInnerClass_na
tiveInit(JNIEnv* |
| 36 env, jobject jcaller) { | 36 env, jobject jcaller); |
| 37 return Init(env, jcaller); | |
| 38 } | |
| 39 | 37 |
| 40 static jint Init(JNIEnv* env, jobject jcaller); | 38 static jint Init(JNIEnv* env, jobject jcaller); |
| 41 | 39 |
| 42 __attribute__((visibility("default"))) | 40 __attribute__((visibility("default"), alias("Init"))) |
| 43 jint | 41 jint |
| 44 Java_org_chromium_example_jni_1generator_SampleForTests_00024MyOtherInnerCla
ss_nativeInit(JNIEnv* | 42 Java_org_chromium_example_jni_1generator_SampleForTests_00024MyOtherInnerCla
ss_nativeInit(JNIEnv* |
| 45 env, jobject jcaller) { | 43 env, jobject jcaller); |
| 46 return Init(env, jcaller); | |
| 47 } | |
| 48 | 44 |
| 49 }; // extern "C" | 45 }; // extern "C" |
| 50 | 46 |
| 51 // Step 2: method stubs. | 47 // Step 2: method stubs. |
| 52 | 48 |
| 53 extern "C" { | 49 extern "C" { |
| 54 __attribute__((visibility("default"))) | 50 __attribute__((visibility("default"))) |
| 55 jint | 51 jint |
| 56 Java_org_chromium_example_jni_1generator_SampleForTests_nativeStaticMethod(J
NIEnv* | 52 Java_org_chromium_example_jni_1generator_SampleForTests_nativeStaticMethod(J
NIEnv* |
| 57 env, | 53 env, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 return true; | 205 return true; |
| 210 } | 206 } |
| 211 | 207 |
| 212 extern "C" JNIEXPORT bool JNICALL | 208 extern "C" JNIEXPORT bool JNICALL |
| 213 Java_org_chromium_example_jni_1generator_SampleForTests_nativeInitNativeClass(JN
IEnv* | 209 Java_org_chromium_example_jni_1generator_SampleForTests_nativeInitNativeClass(JN
IEnv* |
| 214 env, jclass clazz) { | 210 env, jclass clazz) { |
| 215 return RegisterNativesImpl(env, clazz); | 211 return RegisterNativesImpl(env, clazz); |
| 216 } | 212 } |
| 217 | 213 |
| 218 #endif // org_chromium_example_jni_generator_SampleForTests_JNI | 214 #endif // org_chromium_example_jni_generator_SampleForTests_JNI |
| OLD | NEW |