naiveproxy/base/android/jni_generator/testInnerClassNativesBothInnerAndOuterRegistrations.golden

111 lines
3.3 KiB
Plaintext
Raw Normal View History

2018-01-28 21:32:06 +03:00
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is autogenerated by
// base/android/jni_generator/jni_registration_generator.py
// Please do not change its content.
#ifndef HEADER_GUARD
#define HEADER_GUARD
#include <jni.h>
#include "base/android/jni_generator/jni_generator_helper.h"
#include "base/android/jni_int_wrapper.h"
// Step 1: Forward declaration.
extern const char kClassPath_org_chromium_TestJni_00024MyOtherInnerClass[];
extern const char kClassPath_org_chromium_TestJni[];
extern base::subtle::AtomicWord
g_org_chromium_TestJni_00024MyOtherInnerClass_clazz;
#ifndef org_chromium_TestJni_00024MyOtherInnerClass_clazz_defined
#define org_chromium_TestJni_00024MyOtherInnerClass_clazz_defined
inline jclass org_chromium_TestJni_00024MyOtherInnerClass_clazz(JNIEnv* env) {
return base::android::LazyGetClass(env,
kClassPath_org_chromium_TestJni_00024MyOtherInnerClass,
&g_org_chromium_TestJni_00024MyOtherInnerClass_clazz);
}
#endif
extern base::subtle::AtomicWord g_org_chromium_TestJni_clazz;
#ifndef org_chromium_TestJni_clazz_defined
#define org_chromium_TestJni_clazz_defined
inline jclass org_chromium_TestJni_clazz(JNIEnv* env) {
return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni,
&g_org_chromium_TestJni_clazz);
}
#endif
JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_nativeInit(JNIEnv* env,
jobject jcaller);
JNI_GENERATOR_EXPORT jint
Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* env,
jobject jcaller);
// Step 2: Method declarations.
static const JNINativeMethod
kMethods_org_chromium_TestJni_00024MyOtherInnerClass[] = {
{ "nativeInit",
"("
")"
"I",
reinterpret_cast<void*>(Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit)
},
};
static const JNINativeMethod kMethods_org_chromium_TestJni[] = {
{ "nativeInit",
"("
")"
"I", reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeInit) },
};
JNI_REGISTRATION_EXPORT bool RegisterNative_org_chromium_TestJni(JNIEnv* env) {
const int kMethods_org_chromium_TestJni_00024MyOtherInnerClassSize =
arraysize(kMethods_org_chromium_TestJni_00024MyOtherInnerClass);
if
(env->RegisterNatives(org_chromium_TestJni_00024MyOtherInnerClass_clazz(env),
kMethods_org_chromium_TestJni_00024MyOtherInnerClass,
kMethods_org_chromium_TestJni_00024MyOtherInnerClassSize) < 0) {
jni_generator::HandleRegistrationError(
env, org_chromium_TestJni_00024MyOtherInnerClass_clazz(env), __FILE__);
return false;
}
const int kMethods_org_chromium_TestJniSize =
arraysize(kMethods_org_chromium_TestJni);
if (env->RegisterNatives(org_chromium_TestJni_clazz(env),
kMethods_org_chromium_TestJni,
kMethods_org_chromium_TestJniSize) < 0) {
jni_generator::HandleRegistrationError(
env, org_chromium_TestJni_clazz(env), __FILE__);
return false;
}
return true;
}
// Step 3: Main dex and non-main dex registration functions.
bool RegisterMainDexNatives(JNIEnv* env) {
if (!RegisterNative_org_chromium_TestJni(env))
return false;
return true;
}
bool RegisterNonMainDexNatives(JNIEnv* env) {
return true;
}
#endif // HEADER_GUARD