| 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 21 matching lines...) Expand all Loading... |
| 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 JavaParamRef<jobject>& jcaller); |
| 35 | 35 |
| 36 extern "C" __attribute__((visibility("default"))) | 36 extern "C" __attribute__((visibility("default"))) |
| 37 jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, jobject | 37 jint Java_org_chromium_TestJni_00024MyInnerClass_nativeInit(JNIEnv* env, jobject |
| 38 jcaller) { | 38 jcaller) { |
| 39 return Init(env, JavaParamRef<jobject>(env, jcaller)); | 39 return Init(env, JavaParamRef<jobject>(env, jcaller)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Step 3: RegisterNatives. | |
| 43 | |
| 44 static const JNINativeMethod kMethodsMyInnerClass[] = { | 42 static const JNINativeMethod kMethodsMyInnerClass[] = { |
| 45 { "nativeInit", | 43 { "nativeInit", |
| 46 "(" | 44 "(" |
| 47 ")" | 45 ")" |
| 48 "I", | 46 "I", |
| 49 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyInnerClass_nativeIn
it) | 47 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyInnerClass_nativeIn
it) |
| 50 }, | 48 }, |
| 51 }; | 49 }; |
| 52 | 50 |
| 53 static bool RegisterNativesImpl(JNIEnv* env) { | 51 static bool RegisterNativesImpl(JNIEnv* env) { |
| 54 if (base::android::IsManualJniRegistrationDisabled()) return true; | 52 if (base::android::IsManualJniRegistrationDisabled()) return true; |
| 55 | 53 |
| 56 const int kMethodsMyInnerClassSize = arraysize(kMethodsMyInnerClass); | 54 const int kMethodsMyInnerClassSize = arraysize(kMethodsMyInnerClass); |
| 57 | 55 |
| 58 if (env->RegisterNatives(MyInnerClass_clazz(env), | 56 if (env->RegisterNatives(MyInnerClass_clazz(env), |
| 59 kMethodsMyInnerClass, | 57 kMethodsMyInnerClass, |
| 60 kMethodsMyInnerClassSize) < 0) { | 58 kMethodsMyInnerClassSize) < 0) { |
| 61 jni_generator::HandleRegistrationError( | 59 jni_generator::HandleRegistrationError( |
| 62 env, MyInnerClass_clazz(env), __FILE__); | 60 env, MyInnerClass_clazz(env), __FILE__); |
| 63 return false; | 61 return false; |
| 64 } | 62 } |
| 65 | 63 |
| 66 return true; | 64 return true; |
| 67 } | 65 } |
| 68 | 66 |
| 69 #endif // org_chromium_TestJni_JNI | 67 #endif // org_chromium_TestJni_JNI |
| OLD | NEW |