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 13 matching lines...) Expand all Loading... |
24 base::subtle::AtomicWord g_TestJni_clazz __attribute__((unused)) = 0; | 24 base::subtle::AtomicWord g_TestJni_clazz __attribute__((unused)) = 0; |
25 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) | 25 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) |
26 // Leaking this jclass as we cannot use LazyInstance from some threads. | 26 // Leaking this jclass as we cannot use LazyInstance from some threads. |
27 base::subtle::AtomicWord g_MyInnerClass_clazz __attribute__((unused)) = 0; | 27 base::subtle::AtomicWord g_MyInnerClass_clazz __attribute__((unused)) = 0; |
28 #define MyInnerClass_clazz(env) base::android::LazyGetClass(env, kMyInnerClassCl
assPath, &g_MyInnerClass_clazz) | 28 #define MyInnerClass_clazz(env) base::android::LazyGetClass(env, kMyInnerClassCl
assPath, &g_MyInnerClass_clazz) |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 // Step 2: method stubs. | 32 // Step 2: method stubs. |
33 | 33 |
34 static jint Init(JNIEnv* env, const JavaParamRef<jobject>& jcaller); | 34 static jint Init(JNIEnv* env, const base::android::JavaParamRef<jobject>& |
| 35 jcaller); |
35 | 36 |
36 extern "C" __attribute__((visibility("default"))) | 37 extern "C" __attribute__((visibility("default"))) |
37 jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, jobject | 38 jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, jobject |
38 jcaller) { | 39 jcaller) { |
39 return Init(env, JavaParamRef<jobject>(env, jcaller)); | 40 return Init(env, base::android::JavaParamRef<jobject>(env, jcaller)); |
40 } | 41 } |
41 | 42 |
42 // Step 3: RegisterNatives. | 43 // Step 3: RegisterNatives. |
43 | 44 |
44 static const JNINativeMethod kMethodsMyInnerClass[] = { | 45 static const JNINativeMethod kMethodsMyInnerClass[] = { |
45 { "nativeInit", | 46 { "nativeInit", |
46 "(" | 47 "(" |
47 ")" | 48 ")" |
48 "I", | 49 "I", |
49 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyInnerClass_nativeIn
it) | 50 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyInnerClass_nativeIn
it) |
(...skipping 10 matching lines...) Expand all Loading... |
60 kMethodsMyInnerClassSize) < 0) { | 61 kMethodsMyInnerClassSize) < 0) { |
61 jni_generator::HandleRegistrationError( | 62 jni_generator::HandleRegistrationError( |
62 env, MyInnerClass_clazz(env), __FILE__); | 63 env, MyInnerClass_clazz(env), __FILE__); |
63 return false; | 64 return false; |
64 } | 65 } |
65 | 66 |
66 return true; | 67 return true; |
67 } | 68 } |
68 | 69 |
69 #endif // org_chromium_TestJni_JNI | 70 #endif // org_chromium_TestJni_JNI |
OLD | NEW |