// 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 #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 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 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 g_org_chromium_TestJni_showConfirmInfoBar(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_showConfirmInfoBar(JNIEnv* env, const base::android::JavaRef& obj, JniIntWrapper nativeInfoBar, const base::android::JavaRef& buttonOk, const base::android::JavaRef& buttonCancel, const base::android::JavaRef& title, const base::android::JavaRef& 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(env, ret); } static std::atomic g_org_chromium_TestJni_showAutoLoginInfoBar(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_showAutoLoginInfoBar(JNIEnv* env, const base::android::JavaRef& obj, JniIntWrapper nativeInfoBar, const base::android::JavaRef& realm, const base::android::JavaRef& account, const base::android::JavaRef& 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(env, ret); } static std::atomic g_org_chromium_TestJni_00024InfoBar_dismiss(nullptr); static void Java_InfoBar_dismiss(JNIEnv* env, const base::android::JavaRef& 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 g_org_chromium_TestJni_shouldShowAutoLogin(nullptr); static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, const base::android::JavaRef& view, const base::android::JavaRef& realm, const base::android::JavaRef& account, const base::android::JavaRef& 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 g_org_chromium_TestJni_openUrl(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_openUrl(JNIEnv* env, const base::android::JavaRef& 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(env, ret); } static std::atomic g_org_chromium_TestJni_activateHardwareAcceleration(nullptr); static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, const base::android::JavaRef& 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 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 g_org_chromium_TestJni_uncheckedCall(nullptr); static void Java_TestJni_uncheckedCall(JNIEnv* env, const base::android::JavaRef& 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 g_org_chromium_TestJni_returnByteArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnByteArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnBooleanArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnBooleanArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnCharArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnCharArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnShortArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnShortArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnIntArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnIntArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnLongArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnLongArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnDoubleArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnDoubleArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnObjectArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnObjectArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_returnArrayOfByteArray(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_returnArrayOfByteArray(JNIEnv* env, const base::android::JavaRef& 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(env->CallObjectMethod(obj.obj(), method_id)); jni_generator::CheckException(env); return base::android::ScopedJavaLocalRef(env, ret); } static std::atomic g_org_chromium_TestJni_getCompressFormat(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_getCompressFormat(JNIEnv* env, const base::android::JavaRef& 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(env, ret); } static std::atomic g_org_chromium_TestJni_getCompressFormatList(nullptr); static base::android::ScopedJavaLocalRef Java_TestJni_getCompressFormatList(JNIEnv* env, const base::android::JavaRef& 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(env, ret); } #endif // org_chromium_TestJni_JNI