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 18 matching lines...) Expand all Loading... |
29 base::subtle::AtomicWord g_TestJni_clazz __attribute__((unused)) = 0; | 29 base::subtle::AtomicWord g_TestJni_clazz __attribute__((unused)) = 0; |
30 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) | 30 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) |
31 // Leaking this jclass as we cannot use LazyInstance from some threads. | 31 // Leaking this jclass as we cannot use LazyInstance from some threads. |
32 base::subtle::AtomicWord g_MyInnerClass_clazz __attribute__((unused)) = 0; | 32 base::subtle::AtomicWord g_MyInnerClass_clazz __attribute__((unused)) = 0; |
33 #define MyInnerClass_clazz(env) base::android::LazyGetClass(env, kMyInnerClassCl
assPath, &g_MyInnerClass_clazz) | 33 #define MyInnerClass_clazz(env) base::android::LazyGetClass(env, kMyInnerClassCl
assPath, &g_MyInnerClass_clazz) |
34 | 34 |
35 } // namespace | 35 } // namespace |
36 | 36 |
37 // Step 2: method stubs. | 37 // Step 2: method stubs. |
38 | 38 |
39 static jint Init(JNIEnv* env, const JavaParamRef<jobject>& jcaller); | 39 static jint Init(JNIEnv* env, const base::android::JavaParamRef<jobject>& |
| 40 jcaller); |
40 | 41 |
41 extern "C" __attribute__((visibility("default"))) | 42 extern "C" __attribute__((visibility("default"))) |
42 jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, jobject | 43 jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, jobject |
43 jcaller) { | 44 jcaller) { |
44 return Init(env, JavaParamRef<jobject>(env, jcaller)); | 45 return Init(env, base::android::JavaParamRef<jobject>(env, jcaller)); |
45 } | 46 } |
46 | 47 |
47 static jint Init(JNIEnv* env, const JavaParamRef<jobject>& jcaller); | 48 static jint Init(JNIEnv* env, const base::android::JavaParamRef<jobject>& |
| 49 jcaller); |
48 | 50 |
49 extern "C" __attribute__((visibility("default"))) | 51 extern "C" __attribute__((visibility("default"))) |
50 jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* env, | 52 jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* env, |
51 jobject jcaller) { | 53 jobject jcaller) { |
52 return Init(env, JavaParamRef<jobject>(env, jcaller)); | 54 return Init(env, base::android::JavaParamRef<jobject>(env, jcaller)); |
53 } | 55 } |
54 | 56 |
55 // Step 3: RegisterNatives. | 57 // Step 3: RegisterNatives. |
56 | 58 |
57 static const JNINativeMethod kMethodsMyOtherInnerClass[] = { | 59 static const JNINativeMethod kMethodsMyOtherInnerClass[] = { |
58 { "nativeInit", | 60 { "nativeInit", |
59 "(" | 61 "(" |
60 ")" | 62 ")" |
61 "I", | 63 "I", |
62 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nat
iveInit) | 64 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nat
iveInit) |
(...skipping 30 matching lines...) Expand all Loading... |
93 kMethodsMyInnerClassSize) < 0) { | 95 kMethodsMyInnerClassSize) < 0) { |
94 jni_generator::HandleRegistrationError( | 96 jni_generator::HandleRegistrationError( |
95 env, MyInnerClass_clazz(env), __FILE__); | 97 env, MyInnerClass_clazz(env), __FILE__); |
96 return false; | 98 return false; |
97 } | 99 } |
98 | 100 |
99 return true; | 101 return true; |
100 } | 102 } |
101 | 103 |
102 #endif // org_chromium_TestJni_JNI | 104 #endif // org_chromium_TestJni_JNI |
OLD | NEW |