| Index: base/android/jni_generator/testJarJarRemapping.golden
|
| diff --git a/base/android/jni_generator/testJarJarRemapping.golden b/base/android/jni_generator/testJarJarRemapping.golden
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a0950367de3f2ad0d68a1a9192c8812cdbb5646c
|
| --- /dev/null
|
| +++ b/base/android/jni_generator/testJarJarRemapping.golden
|
| @@ -0,0 +1,59 @@
|
| +// Copyright (c) 2012 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/example/jni_generator/Example
|
| +
|
| +#ifndef org_chromium_example_jni_generator_Example_JNI
|
| +#define org_chromium_example_jni_generator_Example_JNI
|
| +
|
| +#include <jni.h>
|
| +
|
| +#include "base/android/jni_android.h"
|
| +#include "base/android/scoped_java_ref.h"
|
| +#include "base/basictypes.h"
|
| +#include "base/logging.h"
|
| +
|
| +using base::android::ScopedJavaLocalRef;
|
| +
|
| +// Step 1: forward declarations.
|
| +namespace {
|
| +const char kExampleClassPath[] = "com/test/jni_generator/Example";
|
| +// Leaking this jclass as we cannot use LazyInstance from some threads.
|
| +jclass g_Example_clazz = NULL;
|
| +} // namespace
|
| +
|
| +static void Test(JNIEnv* env, jclass clazz,
|
| + jobject t);
|
| +
|
| +// Step 2: method stubs.
|
| +
|
| +// Step 3: RegisterNatives.
|
| +
|
| +static bool RegisterNativesImpl(JNIEnv* env) {
|
| +
|
| + g_Example_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
|
| + base::android::GetClass(env, kExampleClassPath).obj()));
|
| + static const JNINativeMethod kMethodsExample[] = {
|
| + { "nativeTest",
|
| +"("
|
| +"Lorg/test2/org/chromium/example2/Test;"
|
| +")"
|
| +"V", reinterpret_cast<void*>(Test) },
|
| + };
|
| + const int kMethodsExampleSize = arraysize(kMethodsExample);
|
| +
|
| + if (env->RegisterNatives(g_Example_clazz,
|
| + kMethodsExample,
|
| + kMethodsExampleSize) < 0) {
|
| + LOG(ERROR) << "RegisterNatives failed in " << __FILE__;
|
| + return false;
|
| + }
|
| +
|
| + return true;
|
| +}
|
| +
|
| +#endif // org_chromium_example_jni_generator_Example_JNI
|
|
|