1 // Copyright 2017 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 6 // This file is autogenerated by 7 // base/android/jni_generator/jni_registration_generator.py 8 // Please do not change its content. 9 10 #ifndef HEADER_GUARD 11 #define HEADER_GUARD 12 13 #include <jni.h> 14 15 #include "base/android/jni_generator/jni_generator_helper.h" 16 #include "base/android/jni_int_wrapper.h" 17 18 19 // Step 1: Forward declarations (classes). 20 21 extern const char kClassPath_org_chromium_TestJni_00024MyOtherInnerClass[]; 22 23 extern const char kClassPath_org_chromium_TestJni[]; 24 extern base::subtle::AtomicWord g_org_chromium_TestJni_00024MyOtherInnerClass_clazz; 25 #ifndef org_chromium_TestJni_00024MyOtherInnerClass_clazz_defined 26 #define org_chromium_TestJni_00024MyOtherInnerClass_clazz_defined 27 inline jclass org_chromium_TestJni_00024MyOtherInnerClass_clazz(JNIEnv* env) { 28 return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni_00024MyOtherInnerClass, 29 &g_org_chromium_TestJni_00024MyOtherInnerClass_clazz); 30 } 31 #endif 32 extern base::subtle::AtomicWord g_org_chromium_TestJni_clazz; 33 #ifndef org_chromium_TestJni_clazz_defined 34 #define org_chromium_TestJni_clazz_defined 35 inline jclass org_chromium_TestJni_clazz(JNIEnv* env) { 36 return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni, 37 &g_org_chromium_TestJni_clazz); 38 } 39 #endif 40 41 42 // Step 2: Forward declarations (methods). 43 44 JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_nativeInit( 45 JNIEnv* env, 46 jobject jcaller); 47 JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit( 48 JNIEnv* env, 49 jobject jcaller); 50 51 52 // Step 3: Method declarations. 53 54 static const JNINativeMethod kMethods_org_chromium_TestJni_00024MyOtherInnerClass[] = { 55 { "nativeInit", "()I", 56 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit) }, 57 }; 58 59 60 static const JNINativeMethod kMethods_org_chromium_TestJni[] = { 61 { "nativeInit", "()I", reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeInit) }, 62 }; 63 64 65 JNI_REGISTRATION_EXPORT bool RegisterNative_org_chromium_TestJni(JNIEnv* env) { 66 const int kMethods_org_chromium_TestJni_00024MyOtherInnerClassSize = 67 arraysize(kMethods_org_chromium_TestJni_00024MyOtherInnerClass); 68 if (env->RegisterNatives( 69 org_chromium_TestJni_00024MyOtherInnerClass_clazz(env), 70 kMethods_org_chromium_TestJni_00024MyOtherInnerClass, 71 kMethods_org_chromium_TestJni_00024MyOtherInnerClassSize) < 0) { 72 jni_generator::HandleRegistrationError(env, 73 org_chromium_TestJni_00024MyOtherInnerClass_clazz(env), 74 __FILE__); 75 return false; 76 } 77 78 79 const int kMethods_org_chromium_TestJniSize = 80 arraysize(kMethods_org_chromium_TestJni); 81 if (env->RegisterNatives( 82 org_chromium_TestJni_clazz(env), 83 kMethods_org_chromium_TestJni, 84 kMethods_org_chromium_TestJniSize) < 0) { 85 jni_generator::HandleRegistrationError(env, 86 org_chromium_TestJni_clazz(env), 87 __FILE__); 88 return false; 89 } 90 91 return true; 92 } 93 94 95 // Step 4: Main dex and non-main dex registration functions. 96 97 bool RegisterMainDexNatives(JNIEnv* env) { 98 if (!RegisterNative_org_chromium_TestJni(env)) 99 return false; 100 101 return true; 102 } 103 104 bool RegisterNonMainDexNatives(JNIEnv* env) { 105 106 return true; 107 } 108 109 #endif // HEADER_GUARD 110