1// Copyright 2017 The Chromium Authors 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 <iterator> 16 17#include "base/android/jni_generator/jni_generator_helper.h" 18#include "base/android/jni_int_wrapper.h" 19 20 21// Step 1: Forward declarations (classes). 22 23extern const char kClassPath_org_chromium_TestJni[]; 24 25extern const char kClassPath_org_chromium_TestJni_00024MyOtherInnerClass[]; 26extern std::atomic<jclass> g_org_chromium_TestJni_clazz; 27#ifndef org_chromium_TestJni_clazz_defined 28#define org_chromium_TestJni_clazz_defined 29inline jclass org_chromium_TestJni_clazz(JNIEnv* env) { 30 return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni, 31 &g_org_chromium_TestJni_clazz); 32} 33#endif 34extern std::atomic<jclass> g_org_chromium_TestJni_00024MyOtherInnerClass_clazz; 35#ifndef org_chromium_TestJni_00024MyOtherInnerClass_clazz_defined 36#define org_chromium_TestJni_00024MyOtherInnerClass_clazz_defined 37inline jclass org_chromium_TestJni_00024MyOtherInnerClass_clazz(JNIEnv* env) { 38 return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni_00024MyOtherInnerClass, 39 &g_org_chromium_TestJni_00024MyOtherInnerClass_clazz); 40} 41#endif 42 43 44// Step 2: Forward declarations (methods). 45 46JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_nativeInit( 47 JNIEnv* env, 48 jobject jcaller); 49JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit( 50 JNIEnv* env, 51 jobject jcaller); 52 53 54// Step 3: Method declarations. 55 56static const JNINativeMethod kMethods_org_chromium_TestJni[] = { 57 { "nativeInit", "()I", reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeInit) }, 58}; 59 60 61static const JNINativeMethod kMethods_org_chromium_TestJni_00024MyOtherInnerClass[] = { 62 { "nativeInit", "()I", 63 reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit) }, 64}; 65 66 67JNI_REGISTRATION_EXPORT bool RegisterNative_org_chromium_TestJni(JNIEnv* env) { 68 const int kMethods_org_chromium_TestJniSize = 69 std::size(kMethods_org_chromium_TestJni); 70 if (env->RegisterNatives( 71 org_chromium_TestJni_clazz(env), 72 kMethods_org_chromium_TestJni, 73 kMethods_org_chromium_TestJniSize) < 0) { 74 jni_generator::HandleRegistrationError(env, 75 org_chromium_TestJni_clazz(env), 76 __FILE__); 77 return false; 78 } 79 80 81 const int kMethods_org_chromium_TestJni_00024MyOtherInnerClassSize = 82 std::size(kMethods_org_chromium_TestJni_00024MyOtherInnerClass); 83 if (env->RegisterNatives( 84 org_chromium_TestJni_00024MyOtherInnerClass_clazz(env), 85 kMethods_org_chromium_TestJni_00024MyOtherInnerClass, 86 kMethods_org_chromium_TestJni_00024MyOtherInnerClassSize) < 0) { 87 jni_generator::HandleRegistrationError(env, 88 org_chromium_TestJni_00024MyOtherInnerClass_clazz(env), 89 __FILE__); 90 return false; 91 } 92 93 return true; 94} 95 96 97// Step 4: Registration function. 98 99namespace test { 100 101bool RegisterNatives(JNIEnv* env) { 102 103 return true; 104} 105 106} // namespace test 107 108#endif // HEADER_GUARD 109