1// Copyright 2014 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_generator.py 8// For 9// org/chromium/example/SampleProxyJni 10 11#ifndef org_chromium_example_SampleProxyJni_JNI 12#define org_chromium_example_SampleProxyJni_JNI 13 14#include <jni.h> 15 16#include "base/android/jni_generator/jni_generator_helper.h" 17 18 19// Step 1: Forward declarations. 20 21 22// Step 2: Constants (optional). 23 24 25// Step 3: Method stubs. 26JNI_GENERATOR_EXPORT void 27 Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1SampleProxyJni_1foo( 28 JNIEnv* env, 29 jclass jcaller, 30 jlong nativePtr) { 31 FooAndroid::BarDelegate* native = reinterpret_cast<FooAndroid::BarDelegate*>(nativePtr); 32 CHECK_NATIVE_PTR(env, jcaller, native, "Foo"); 33 return native->Foo(env); 34} 35 36static jint JNI_SampleProxyJni_Bar(JNIEnv* env, jint x, 37 jint y); 38 39JNI_GENERATOR_EXPORT jint 40 Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1SampleProxyJni_1bar( 41 JNIEnv* env, 42 jclass jcaller, 43 jint x, 44 jint y) { 45 return JNI_SampleProxyJni_Bar(env, x, y); 46} 47 48static base::android::ScopedJavaLocalRef<jstring> JNI_SampleProxyJni_Foobar(JNIEnv* env, const 49 base::android::JavaParamRef<jstring>& x, 50 const base::android::JavaParamRef<jstring>& y); 51 52JNI_GENERATOR_EXPORT jstring 53 Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1SampleProxyJni_1foobar( 54 JNIEnv* env, 55 jclass jcaller, 56 jstring x, 57 jstring y) { 58 return JNI_SampleProxyJni_Foobar(env, base::android::JavaParamRef<jstring>(env, x), 59 base::android::JavaParamRef<jstring>(env, y)).Release(); 60} 61 62 63#endif // org_chromium_example_SampleProxyJni_JNI 64