Index: base/android/jni_generator/testNativeExportsOptionalOption.golden |
diff --git a/base/android/jni_generator/testNativeExportsOption.golden b/base/android/jni_generator/testNativeExportsOptionalOption.golden |
similarity index 76% |
copy from base/android/jni_generator/testNativeExportsOption.golden |
copy to base/android/jni_generator/testNativeExportsOptionalOption.golden |
index a4953cc3ea4a5b4ac2a48b6f7e51ac3be6718f19..2a3b172dc83f13b948ff835c89bb8d5bbd6a2f5e 100644 |
--- a/base/android/jni_generator/testNativeExportsOption.golden |
+++ b/base/android/jni_generator/testNativeExportsOptionalOption.golden |
@@ -198,10 +198,79 @@ static_cast<jstring>(env->CallStaticObjectMethod(SampleForTests_clazz(env), |
// Step 3: RegisterNatives. |
+static const JNINativeMethod kMethodsMyOtherInnerClass[] = { |
+ { "nativeInit", |
+"(" |
+")" |
+"I", |
+ reinterpret_cast<void*>(Java_org_chromium_example_jni_1generator_SampleForTests_00024MyOtherInnerClass_nativeInit) |
+ }, |
+}; |
+ |
+static const JNINativeMethod kMethodsMyInnerClass[] = { |
+ { "nativeInit", |
+"(" |
+")" |
+"I", |
+ reinterpret_cast<void*>(Java_org_chromium_example_jni_1generator_SampleForTests_00024MyInnerClass_nativeInit) |
+ }, |
+}; |
+ |
+static const JNINativeMethod kMethodsSampleForTests[] = { |
+ { "nativeStaticMethod", |
+"(" |
+"J" |
+"I" |
+")" |
+"I", |
+ reinterpret_cast<void*>(Java_org_chromium_example_jni_1generator_SampleForTests_nativeStaticMethod) |
+ }, |
+ { "nativeMethod", |
+"(" |
+"J" |
+"I" |
+")" |
+"I", |
+ reinterpret_cast<void*>(Java_org_chromium_example_jni_1generator_SampleForTests_nativeMethod) |
+ }, |
+}; |
+ |
static bool RegisterNativesImpl(JNIEnv* env, jclass clazz) { |
+ if (base::android::IsManualJniRegistrationDisabled()) return true; |
base::subtle::Release_Store(&g_SampleForTests_clazz, |
static_cast<base::subtle::AtomicWord>(env->NewWeakGlobalRef(clazz)); |
+ const int kMethodsMyOtherInnerClassSize = |
+ arraysize(kMethodsMyOtherInnerClass); |
+ |
+ if (env->RegisterNatives(MyOtherInnerClass_clazz(env), |
+ kMethodsMyOtherInnerClass, |
+ kMethodsMyOtherInnerClassSize) < 0) { |
+ jni_generator::HandleRegistrationError( |
+ env, MyOtherInnerClass_clazz(env), __FILE__); |
+ return false; |
+ } |
+ |
+ const int kMethodsMyInnerClassSize = arraysize(kMethodsMyInnerClass); |
+ |
+ if (env->RegisterNatives(MyInnerClass_clazz(env), |
+ kMethodsMyInnerClass, |
+ kMethodsMyInnerClassSize) < 0) { |
+ jni_generator::HandleRegistrationError( |
+ env, MyInnerClass_clazz(env), __FILE__); |
+ return false; |
+ } |
+ |
+ const int kMethodsSampleForTestsSize = arraysize(kMethodsSampleForTests); |
+ |
+ if (env->RegisterNatives(SampleForTests_clazz(env), |
+ kMethodsSampleForTests, |
+ kMethodsSampleForTestsSize) < 0) { |
+ jni_generator::HandleRegistrationError( |
+ env, SampleForTests_clazz(env), __FILE__); |
+ return false; |
+ } |
+ |
return true; |
} |