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/TestJni | 8 // org/chromium/TestJni |
9 | 9 |
10 #ifndef org_chromium_TestJni_JNI | 10 #ifndef org_chromium_TestJni_JNI |
(...skipping 14 matching lines...) Expand all Loading... |
25 base::subtle::AtomicWord g_MyOtherInnerClass_clazz __attribute__((unused)) = 0; | 25 base::subtle::AtomicWord g_MyOtherInnerClass_clazz __attribute__((unused)) = 0; |
26 #define MyOtherInnerClass_clazz(env) base::android::LazyGetClass(env, kMyOtherIn
nerClassClassPath, &g_MyOtherInnerClass_clazz) | 26 #define MyOtherInnerClass_clazz(env) base::android::LazyGetClass(env, kMyOtherIn
nerClassClassPath, &g_MyOtherInnerClass_clazz) |
27 // Leaking this jclass as we cannot use LazyInstance from some threads. | 27 // Leaking this jclass as we cannot use LazyInstance from some threads. |
28 base::subtle::AtomicWord g_TestJni_clazz __attribute__((unused)) = 0; | 28 base::subtle::AtomicWord g_TestJni_clazz __attribute__((unused)) = 0; |
29 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) | 29 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) |
30 | 30 |
31 } // namespace | 31 } // namespace |
32 | 32 |
33 // Step 2: method stubs. | 33 // Step 2: method stubs. |
34 | 34 |
35 static jint Init(JNIEnv* env, const JavaParamRef<jobject>& jcaller); | 35 static jint Init(JNIEnv* env, const base::android::JavaParamRef<jobject>& |
| 36 jcaller); |
36 | 37 |
37 extern "C" __attribute__((visibility("default"))) | 38 extern "C" __attribute__((visibility("default"))) |
38 jint Java_org_chromium_TestJni_nativeInit(JNIEnv* env, jobject jcaller) { | 39 jint Java_org_chromium_TestJni_nativeInit(JNIEnv* env, jobject jcaller) { |
39 return Init(env, JavaParamRef<jobject>(env, jcaller)); | 40 return Init(env, base::android::JavaParamRef<jobject>(env, jcaller)); |
40 } | 41 } |
41 | 42 |
42 static jint Init(JNIEnv* env, const JavaParamRef<jobject>& jcaller); | 43 static jint Init(JNIEnv* env, const base::android::JavaParamRef<jobject>& |
| 44 jcaller); |
43 | 45 |
44 extern "C" __attribute__((visibility("default"))) | 46 extern "C" __attribute__((visibility("default"))) |
45 jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* env, | 47 jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* env, |
46 jobject jcaller) { | 48 jobject jcaller) { |
47 return Init(env, JavaParamRef<jobject>(env, jcaller)); | 49 return Init(env, base::android::JavaParamRef<jobject>(env, jcaller)); |
48 } | 50 } |
49 | 51 |
50 // Step 3: RegisterNatives. | 52 // Step 3: RegisterNatives. |
51 | 53 |
52 static const JNINativeMethod kMethodsMyOtherInnerClass[] = { | 54 static const JNINativeMethod kMethodsMyOtherInnerClass[] = { |
53 { "nativeInit", | 55 { "nativeInit", |
54 "(" | 56 "(" |
55 ")" | 57 ")" |
56 "I", | 58 "I", |
57 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nat
iveInit) | 59 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nat
iveInit) |
(...skipping 28 matching lines...) Expand all Loading... |
86 kMethodsTestJniSize) < 0) { | 88 kMethodsTestJniSize) < 0) { |
87 jni_generator::HandleRegistrationError( | 89 jni_generator::HandleRegistrationError( |
88 env, TestJni_clazz(env), __FILE__); | 90 env, TestJni_clazz(env), __FILE__); |
89 return false; | 91 return false; |
90 } | 92 } |
91 | 93 |
92 return true; | 94 return true; |
93 } | 95 } |
94 | 96 |
95 #endif // org_chromium_TestJni_JNI | 97 #endif // org_chromium_TestJni_JNI |
OLD | NEW |