Home | History | Annotate | Download | only in jni_generator
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      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/TestJni
     10 
     11 #ifndef org_chromium_TestJni_JNI
     12 #define org_chromium_TestJni_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 JNI_REGISTRATION_EXPORT extern const char kClassPath_org_chromium_TestJni[];
     22 const char kClassPath_org_chromium_TestJni[] = "org/chromium/TestJni";
     23 // Leaking this jclass as we cannot use LazyInstance from some threads.
     24 JNI_REGISTRATION_EXPORT base::subtle::AtomicWord g_org_chromium_TestJni_clazz = 0;
     25 #ifndef org_chromium_TestJni_clazz_defined
     26 #define org_chromium_TestJni_clazz_defined
     27 inline jclass org_chromium_TestJni_clazz(JNIEnv* env) {
     28   return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni,
     29       &g_org_chromium_TestJni_clazz);
     30 }
     31 #endif
     32 
     33 
     34 // Step 2: Constants (optional).
     35 
     36 
     37 // Step 3: Method stubs.
     38 JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeDestroy(
     39     JNIEnv* env,
     40     jobject jcaller,
     41     jlong nativeChromeBrowserProvider) {
     42   ChromeBrowserProvider* native =
     43       reinterpret_cast<ChromeBrowserProvider*>(nativeChromeBrowserProvider);
     44   CHECK_NATIVE_PTR(env, jcaller, native, "Destroy");
     45   return native->Destroy(env, base::android::JavaParamRef<jobject>(env, jcaller));
     46 }
     47 
     48 
     49 #endif  // org_chromium_TestJni_JNI
     50