Update broken references to image assets
[chromium-blink-merge.git] / base / android / jni_generator / testJarJarRemapping.golden
blobb626a8a1c23acf25099f0b17685eb79f8bf3e08b
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.
5 // This file is autogenerated by
6 //     base/android/jni_generator/jni_generator.py
7 // For
8 //     org/chromium/example/jni_generator/Example
10 #ifndef org_chromium_example_jni_generator_Example_JNI
11 #define org_chromium_example_jni_generator_Example_JNI
13 #include <jni.h>
15 #include "base/android/jni_generator/jni_generator_helper.h"
17 #include "base/android/jni_int_wrapper.h"
19 // Step 1: forward declarations.
20 namespace {
21 const char kExampleClassPath[] = "com/test/jni_generator/Example";
22 // Leaking this jclass as we cannot use LazyInstance from some threads.
23 jclass g_Example_clazz = NULL;
24 #define Example_clazz(env) g_Example_clazz
26 }  // namespace
28 // Step 2: method stubs.
30 static void Test(JNIEnv* env, jclass jcaller,
31     jobject t);
33 static void Java_com_test_jni_1generator_Example_nativeTest(JNIEnv* env, jclass
34     jcaller,
35     jobject t) {
36   return Test(env, jcaller, t);
39 static void Test2(JNIEnv* env, jclass jcaller,
40     jobject t);
42 static void Java_com_test_jni_1generator_Example_nativeTest2(JNIEnv* env, jclass
43     jcaller,
44     jobject t) {
45   return Test2(env, jcaller, t);
48 static void Test3(JNIEnv* env, jclass jcaller,
49     jobject t);
51 static void Java_com_test_jni_1generator_Example_nativeTest3(JNIEnv* env, jclass
52     jcaller,
53     jobject t) {
54   return Test3(env, jcaller, t);
57 static void Test4(JNIEnv* env, jclass jcaller,
58     jobject t);
60 static void Java_com_test_jni_1generator_Example_nativeTest4(JNIEnv* env, jclass
61     jcaller,
62     jobject t) {
63   return Test4(env, jcaller, t);
66 // Step 3: RegisterNatives.
68 static const JNINativeMethod kMethodsExample[] = {
69     { "nativeTest",
70 "("
71 "Lorg/test2/Test;"
72 ")"
73 "V", reinterpret_cast<void*>(Java_com_test_jni_1generator_Example_nativeTest) },
74     { "nativeTest2",
75 "("
76 "Lorg/chromium/example3/PrefixFoo;"
77 ")"
78 "V", reinterpret_cast<void*>(Java_com_test_jni_1generator_Example_nativeTest2)
79     },
80     { "nativeTest3",
81 "("
82 "Lorg/test3/Test;"
83 ")"
84 "V", reinterpret_cast<void*>(Java_com_test_jni_1generator_Example_nativeTest3)
85     },
86     { "nativeTest4",
87 "("
88 "Lorg/test3/TestBar$Inner;"
89 ")"
90 "V", reinterpret_cast<void*>(Java_com_test_jni_1generator_Example_nativeTest4)
91     },
94 static bool RegisterNativesImpl(JNIEnv* env) {
96   g_Example_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
97       base::android::GetClass(env, kExampleClassPath).obj()));
99   const int kMethodsExampleSize = arraysize(kMethodsExample);
101   if (env->RegisterNatives(Example_clazz(env),
102                            kMethodsExample,
103                            kMethodsExampleSize) < 0) {
104     jni_generator::HandleRegistrationError(
105         env, Example_clazz(env), __FILE__);
106     return false;
107   }
109   return true;
112 #endif  // org_chromium_example_jni_generator_Example_JNI