naiveproxy/base/android/jni_generator/testCalledByNatives.golden
2018-08-14 22:19:20 +00:00

420 lines
17 KiB
Plaintext

// Copyright 2014 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_generator.py
// For
// org/chromium/TestJni
#ifndef org_chromium_TestJni_JNI
#define org_chromium_TestJni_JNI
#include <jni.h>
#include "base/android/jni_generator/jni_generator_helper.h"
// Step 1: Forward declarations.
JNI_REGISTRATION_EXPORT extern const char kClassPath_org_chromium_TestJni[];
const char kClassPath_org_chromium_TestJni[] = "org/chromium/TestJni";
JNI_REGISTRATION_EXPORT extern const char kClassPath_org_chromium_TestJni_00024InfoBar[];
const char kClassPath_org_chromium_TestJni_00024InfoBar[] = "org/chromium/TestJni$InfoBar";
// Leaking this jclass as we cannot use LazyInstance from some threads.
JNI_REGISTRATION_EXPORT std::atomic<jclass> g_org_chromium_TestJni_clazz(nullptr);
#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
// Leaking this jclass as we cannot use LazyInstance from some threads.
JNI_REGISTRATION_EXPORT std::atomic<jclass> g_org_chromium_TestJni_00024InfoBar_clazz(nullptr);
#ifndef org_chromium_TestJni_00024InfoBar_clazz_defined
#define org_chromium_TestJni_00024InfoBar_clazz_defined
inline jclass org_chromium_TestJni_00024InfoBar_clazz(JNIEnv* env) {
return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni_00024InfoBar,
&g_org_chromium_TestJni_00024InfoBar_clazz);
}
#endif
// Step 2: Constants (optional).
// Step 3: Method stubs.
static std::atomic<jmethodID> g_org_chromium_TestJni_showConfirmInfoBar(nullptr);
static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_showConfirmInfoBar(JNIEnv* env, const
base::android::JavaRef<jobject>& obj, JniIntWrapper nativeInfoBar,
const base::android::JavaRef<jstring>& buttonOk,
const base::android::JavaRef<jstring>& buttonCancel,
const base::android::JavaRef<jstring>& title,
const base::android::JavaRef<jobject>& icon) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"showConfirmInfoBar",
"(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;)Lorg/chromium/Foo$InnerClass;",
&g_org_chromium_TestJni_showConfirmInfoBar);
jobject ret =
env->CallObjectMethod(obj.obj(),
method_id, as_jint(nativeInfoBar), buttonOk.obj(), buttonCancel.obj(), title.obj(),
icon.obj());
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobject>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_showAutoLoginInfoBar(nullptr);
static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_showAutoLoginInfoBar(JNIEnv* env,
const base::android::JavaRef<jobject>& obj, JniIntWrapper nativeInfoBar,
const base::android::JavaRef<jstring>& realm,
const base::android::JavaRef<jstring>& account,
const base::android::JavaRef<jstring>& args) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"showAutoLoginInfoBar",
"(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/Foo$InnerClass;",
&g_org_chromium_TestJni_showAutoLoginInfoBar);
jobject ret =
env->CallObjectMethod(obj.obj(),
method_id, as_jint(nativeInfoBar), realm.obj(), account.obj(), args.obj());
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobject>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_00024InfoBar_dismiss(nullptr);
static void Java_InfoBar_dismiss(JNIEnv* env, const base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_00024InfoBar_clazz(env));
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_00024InfoBar_clazz(env),
"dismiss",
"()V",
&g_org_chromium_TestJni_00024InfoBar_dismiss);
env->CallVoidMethod(obj.obj(),
method_id);
jni_generator::CheckException(env);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_shouldShowAutoLogin(nullptr);
static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, const base::android::JavaRef<jobject>&
view,
const base::android::JavaRef<jstring>& realm,
const base::android::JavaRef<jstring>& account,
const base::android::JavaRef<jstring>& args) {
CHECK_CLAZZ(env, org_chromium_TestJni_clazz(env),
org_chromium_TestJni_clazz(env), false);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_STATIC>(
env, org_chromium_TestJni_clazz(env),
"shouldShowAutoLogin",
"(Landroid/view/View;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z",
&g_org_chromium_TestJni_shouldShowAutoLogin);
jboolean ret =
env->CallStaticBooleanMethod(org_chromium_TestJni_clazz(env),
method_id, view.obj(), realm.obj(), account.obj(), args.obj());
jni_generator::CheckException(env);
return ret;
}
static std::atomic<jmethodID> g_org_chromium_TestJni_openUrl(nullptr);
static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* env, const
base::android::JavaRef<jstring>& url) {
CHECK_CLAZZ(env, org_chromium_TestJni_clazz(env),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_STATIC>(
env, org_chromium_TestJni_clazz(env),
"openUrl",
"(Ljava/lang/String;)Ljava/io/InputStream;",
&g_org_chromium_TestJni_openUrl);
jobject ret =
env->CallStaticObjectMethod(org_chromium_TestJni_clazz(env),
method_id, url.obj());
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobject>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_activateHardwareAcceleration(nullptr);
static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, const
base::android::JavaRef<jobject>& obj, jboolean activated,
JniIntWrapper iPid,
JniIntWrapper iType,
JniIntWrapper iPrimaryID,
JniIntWrapper iSecondaryID) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env));
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"activateHardwareAcceleration",
"(ZIIII)V",
&g_org_chromium_TestJni_activateHardwareAcceleration);
env->CallVoidMethod(obj.obj(),
method_id, activated, as_jint(iPid), as_jint(iType), as_jint(iPrimaryID),
as_jint(iSecondaryID));
jni_generator::CheckException(env);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_updateStatus(nullptr);
static jint Java_TestJni_updateStatus(JNIEnv* env, JniIntWrapper status) {
CHECK_CLAZZ(env, org_chromium_TestJni_clazz(env),
org_chromium_TestJni_clazz(env), 0);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_STATIC>(
env, org_chromium_TestJni_clazz(env),
"updateStatus",
"(I)I",
&g_org_chromium_TestJni_updateStatus);
jint ret =
env->CallStaticIntMethod(org_chromium_TestJni_clazz(env),
method_id, as_jint(status));
jni_generator::CheckException(env);
return ret;
}
static std::atomic<jmethodID> g_org_chromium_TestJni_uncheckedCall(nullptr);
static void Java_TestJni_uncheckedCall(JNIEnv* env, const base::android::JavaRef<jobject>& obj,
JniIntWrapper iParam) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env));
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"uncheckedCall",
"(I)V",
&g_org_chromium_TestJni_uncheckedCall);
env->CallVoidMethod(obj.obj(),
method_id, as_jint(iParam));
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnByteArray(nullptr);
static base::android::ScopedJavaLocalRef<jbyteArray> Java_TestJni_returnByteArray(JNIEnv* env, const
base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnByteArray",
"()[B",
&g_org_chromium_TestJni_returnByteArray);
jbyteArray ret =
static_cast<jbyteArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jbyteArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnBooleanArray(nullptr);
static base::android::ScopedJavaLocalRef<jbooleanArray> Java_TestJni_returnBooleanArray(JNIEnv* env,
const base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnBooleanArray",
"()[Z",
&g_org_chromium_TestJni_returnBooleanArray);
jbooleanArray ret =
static_cast<jbooleanArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jbooleanArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnCharArray(nullptr);
static base::android::ScopedJavaLocalRef<jcharArray> Java_TestJni_returnCharArray(JNIEnv* env, const
base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnCharArray",
"()[C",
&g_org_chromium_TestJni_returnCharArray);
jcharArray ret =
static_cast<jcharArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jcharArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnShortArray(nullptr);
static base::android::ScopedJavaLocalRef<jshortArray> Java_TestJni_returnShortArray(JNIEnv* env,
const base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnShortArray",
"()[S",
&g_org_chromium_TestJni_returnShortArray);
jshortArray ret =
static_cast<jshortArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jshortArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnIntArray(nullptr);
static base::android::ScopedJavaLocalRef<jintArray> Java_TestJni_returnIntArray(JNIEnv* env, const
base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnIntArray",
"()[I",
&g_org_chromium_TestJni_returnIntArray);
jintArray ret =
static_cast<jintArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jintArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnLongArray(nullptr);
static base::android::ScopedJavaLocalRef<jlongArray> Java_TestJni_returnLongArray(JNIEnv* env, const
base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnLongArray",
"()[J",
&g_org_chromium_TestJni_returnLongArray);
jlongArray ret =
static_cast<jlongArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jlongArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnDoubleArray(nullptr);
static base::android::ScopedJavaLocalRef<jdoubleArray> Java_TestJni_returnDoubleArray(JNIEnv* env,
const base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnDoubleArray",
"()[D",
&g_org_chromium_TestJni_returnDoubleArray);
jdoubleArray ret =
static_cast<jdoubleArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jdoubleArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnObjectArray(nullptr);
static base::android::ScopedJavaLocalRef<jobjectArray> Java_TestJni_returnObjectArray(JNIEnv* env,
const base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnObjectArray",
"()[Ljava/lang/Object;",
&g_org_chromium_TestJni_returnObjectArray);
jobjectArray ret =
static_cast<jobjectArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_returnArrayOfByteArray(nullptr);
static base::android::ScopedJavaLocalRef<jobjectArray> Java_TestJni_returnArrayOfByteArray(JNIEnv*
env, const base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"returnArrayOfByteArray",
"()[[B",
&g_org_chromium_TestJni_returnArrayOfByteArray);
jobjectArray ret =
static_cast<jobjectArray>(env->CallObjectMethod(obj.obj(),
method_id));
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_getCompressFormat(nullptr);
static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormat(JNIEnv* env, const
base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"getCompressFormat",
"()Landroid/graphics/Bitmap$CompressFormat;",
&g_org_chromium_TestJni_getCompressFormat);
jobject ret =
env->CallObjectMethod(obj.obj(),
method_id);
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobject>(env, ret);
}
static std::atomic<jmethodID> g_org_chromium_TestJni_getCompressFormatList(nullptr);
static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormatList(JNIEnv* env,
const base::android::JavaRef<jobject>& obj) {
CHECK_CLAZZ(env, obj.obj(),
org_chromium_TestJni_clazz(env), NULL);
jmethodID method_id = base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, org_chromium_TestJni_clazz(env),
"getCompressFormatList",
"()Ljava/util/List;",
&g_org_chromium_TestJni_getCompressFormatList);
jobject ret =
env->CallObjectMethod(obj.obj(),
method_id);
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobject>(env, ret);
}
#endif // org_chromium_TestJni_JNI