// 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 base::subtle::AtomicWord g_org_chromium_TestJni_clazz = 0; #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 base::subtle::AtomicWord g_org_chromium_TestJni_00024InfoBar_clazz = 0; #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: method stubs. static base::subtle::AtomicWord g_org_chromium_TestJni_showConfirmInfoBar = 0; 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", "(" "I" "Ljava/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 base::subtle::AtomicWord g_org_chromium_TestJni_showAutoLoginInfoBar = 0; 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", "(" "I" "Ljava/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 base::subtle::AtomicWord g_org_chromium_TestJni_00024InfoBar_dismiss = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_shouldShowAutoLogin = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_openUrl = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_activateHardwareAcceleration = 0; 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", "(" "Z" "I" "I" "I" "I" ")" "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 base::subtle::AtomicWord g_org_chromium_TestJni_updateStatus = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_uncheckedCall = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnByteArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnBooleanArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnCharArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnShortArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnIntArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnLongArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnDoubleArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnObjectArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_returnArrayOfByteArray = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_getCompressFormat = 0; 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 base::subtle::AtomicWord g_org_chromium_TestJni_getCompressFormatList = 0; 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