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 12 matching lines...) Expand all Loading... |
23 const char kTestJniClassPath[] = "org/chromium/TestJni"; | 23 const char kTestJniClassPath[] = "org/chromium/TestJni"; |
24 const char kMyInnerClassClassPath[] = "org/chromium/TestJni$MyInnerClass"; | 24 const char kMyInnerClassClassPath[] = "org/chromium/TestJni$MyInnerClass"; |
25 // Leaking this jclass as we cannot use LazyInstance from some threads. | 25 // Leaking this jclass as we cannot use LazyInstance from some threads. |
26 jclass g_TestJni_clazz = NULL; | 26 jclass g_TestJni_clazz = NULL; |
27 #define TestJni_clazz(env) g_TestJni_clazz | 27 #define TestJni_clazz(env) g_TestJni_clazz |
28 | 28 |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 // Step 2: method stubs. | 31 // Step 2: method stubs. |
32 | 32 |
33 static jint Init(JNIEnv* env, jobject jcaller); | 33 static jint Init(JNIEnv* env, const JavaParamRef<jobject>& jcaller); |
34 | 34 |
35 static jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, | 35 static jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, |
36 jobject jcaller) { | 36 jobject jcaller) { |
37 return Init(env, jcaller); | 37 return Init(env, JavaParamRef<jobject>(env, jcaller)); |
38 } | 38 } |
39 | 39 |
40 static jint Init(JNIEnv* env, jobject jcaller); | 40 static jint Init(JNIEnv* env, const JavaParamRef<jobject>& jcaller); |
41 | 41 |
42 static jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* | 42 static jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* |
43 env, jobject jcaller) { | 43 env, jobject jcaller) { |
44 return Init(env, jcaller); | 44 return Init(env, JavaParamRef<jobject>(env, jcaller)); |
45 } | 45 } |
46 | 46 |
47 // Step 3: RegisterNatives. | 47 // Step 3: RegisterNatives. |
48 | 48 |
49 static const JNINativeMethod kMethodsMyOtherInnerClass[] = { | 49 static const JNINativeMethod kMethodsMyOtherInnerClass[] = { |
50 { "nativeInit", | 50 { "nativeInit", |
51 "(" | 51 "(" |
52 ")" | 52 ")" |
53 "I", | 53 "I", |
54 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nat
iveInit) | 54 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nat
iveInit) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 kMethodsMyInnerClassSize) < 0) { | 87 kMethodsMyInnerClassSize) < 0) { |
88 jni_generator::HandleRegistrationError( | 88 jni_generator::HandleRegistrationError( |
89 env, MyInnerClass_clazz(env), __FILE__); | 89 env, MyInnerClass_clazz(env), __FILE__); |
90 return false; | 90 return false; |
91 } | 91 } |
92 | 92 |
93 return true; | 93 return true; |
94 } | 94 } |
95 | 95 |
96 #endif // org_chromium_TestJni_JNI | 96 #endif // org_chromium_TestJni_JNI |
OLD | NEW |