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 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 jstring ret = | 189 jstring ret = |
190 static_cast<jstring>(env->CallStaticObjectMethod(SampleForTests_clazz(env), | 190 static_cast<jstring>(env->CallStaticObjectMethod(SampleForTests_clazz(env), |
191 method_id)); | 191 method_id)); |
192 jni_generator::CheckException(env); | 192 jni_generator::CheckException(env); |
193 return ScopedJavaLocalRef<jstring>(env, ret); | 193 return ScopedJavaLocalRef<jstring>(env, ret); |
194 } | 194 } |
195 | 195 |
196 // Step 3: RegisterNatives. | 196 // Step 3: RegisterNatives. |
197 | 197 |
198 static bool RegisterNativesImpl(JNIEnv* env, jclass clazz) { | 198 static bool RegisterNativesImpl(JNIEnv* env) { |
199 | |
200 base::subtle::Release_Store(&g_SampleForTests_clazz, | |
201 static_cast<base::subtle::AtomicWord>(env->NewWeakGlobalRef(clazz)); | |
202 | 199 |
203 return true; | 200 return true; |
204 } | 201 } |
205 | 202 |
206 extern "C" JNIEXPORT bool JNICALL | |
207 Java_org_chromium_example_jni_1generator_SampleForTests_nativeInitNativeClass(JN
IEnv* | |
208 env, jclass clazz) { | |
209 return RegisterNativesImpl(env, clazz); | |
210 } | |
211 | |
212 #endif // org_chromium_example_jni_generator_SampleForTests_JNI | 203 #endif // org_chromium_example_jni_generator_SampleForTests_JNI |
OLD | NEW |