Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2299)

Unified Diff: base/android/jni_generator/testEagerCalledByNativesOption.golden

Issue 1959583003: jni_generator: remove obsolete/unused features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo whitespace change to reduce diff to golden files Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/android/jni_generator/testEagerCalledByNativesOption.golden
diff --git a/base/android/jni_generator/testEagerCalledByNativesOption.golden b/base/android/jni_generator/testEagerCalledByNativesOption.golden
deleted file mode 100644
index b01cd3999fdc01a4211b295c8b4b96ab0f8e5ec8..0000000000000000000000000000000000000000
--- a/base/android/jni_generator/testEagerCalledByNativesOption.golden
+++ /dev/null
@@ -1,149 +0,0 @@
-// 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/example/jni_generator/Test
-
-#ifndef org_chromium_example_jni_generator_Test_JNI
-#define org_chromium_example_jni_generator_Test_JNI
-
-#include <jni.h>
-
-#include "base/android/jni_generator/jni_generator_helper.h"
-
-#include "base/android/jni_int_wrapper.h"
-
-// Step 1: forward declarations.
-namespace {
-const char kTestClassPath[] = "org/chromium/example/jni_generator/Test";
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-jclass g_Test_clazz = NULL;
-#define Test_clazz(env) g_Test_clazz
-jmethodID g_Test_testMethodWithParam = NULL;
-jmethodID g_Test_testStaticMethodWithParam = NULL;
-jmethodID g_Test_testMethodWithNoParam = NULL;
-jmethodID g_Test_testStaticMethodWithNoParam = NULL;
-} // namespace
-
-// Step 2: method stubs.
-static jint Java_org_chromium_example_jni_1generator_Test_nativeMethod(JNIEnv*
- env,
- jobject jcaller,
- jlong nativeTest,
- jint arg1) {
- Test* native = reinterpret_cast<Test*>(nativeTest);
- CHECK_NATIVE_PTR(env, jcaller, native, "Method", 0);
- return native->Method(env, JavaParamRef<jobject>(env, jcaller), arg1);
-}
-
-namespace {
-
-static void testMethodWithParam(JNIEnv* env, jobject obj, JniIntWrapper iParam)
- {
- env->CallVoidMethod(obj,
- g_Test_testMethodWithParam, as_jint(iParam));
-
-}
-
-static jint testStaticMethodWithParam(JNIEnv* env, JniIntWrapper iParam) {
- jint ret = env->CallStaticIntMethod(Test_clazz(env),
- g_Test_testStaticMethodWithParam, as_jint(iParam));
- return ret;
-}
-
-static jdouble testMethodWithNoParam(JNIEnv* env) {
- jdouble ret = env->CallStaticDoubleMethod(Test_clazz(env),
- g_Test_testMethodWithNoParam);
- return ret;
-}
-
-static ScopedJavaLocalRef<jstring> testStaticMethodWithNoParam(JNIEnv* env) {
- jstring ret =
- static_cast<jstring>(env->CallStaticObjectMethod(Test_clazz(env),
- g_Test_testStaticMethodWithNoParam));
- return ScopedJavaLocalRef<jstring>(env, ret);
-}
-} // namespace
-
-// Step 3: RegisterNatives.
-
-static const JNINativeMethod kMethodsTest[] = {
- { "nativeMethod",
-"("
-"J"
-"I"
-")"
-"I",
- reinterpret_cast<void*>(Java_org_chromium_example_jni_1generator_Test_nativeMethod)
- },
-};
-
-static bool RegisterNativesImpl(JNIEnv* env, jclass clazz) {
-
- g_Test_clazz = static_cast<jclass>(env->NewWeakGlobalRef(clazz));
-
- const int kMethodsTestSize = arraysize(kMethodsTest);
-
- if (env->RegisterNatives(Test_clazz(env),
- kMethodsTest,
- kMethodsTestSize) < 0) {
- jni_generator::HandleRegistrationError(
- env, Test_clazz(env), __FILE__);
- return false;
- }
-
- g_Test_testMethodWithParam = env->GetMethodID(
- Test_clazz(env),
- "testMethodWithParam",
-"("
-"I"
-")"
-"V");
- if (g_Test_testMethodWithParam == NULL) {
- return false;
- }
-
- g_Test_testStaticMethodWithParam = env->GetStaticMethodID(
- Test_clazz(env),
- "testStaticMethodWithParam",
-"("
-"I"
-")"
-"I");
- if (g_Test_testStaticMethodWithParam == NULL) {
- return false;
- }
-
- g_Test_testMethodWithNoParam = env->GetStaticMethodID(
- Test_clazz(env),
- "testMethodWithNoParam",
-"("
-")"
-"D");
- if (g_Test_testMethodWithNoParam == NULL) {
- return false;
- }
-
- g_Test_testStaticMethodWithNoParam = env->GetStaticMethodID(
- Test_clazz(env),
- "testStaticMethodWithNoParam",
-"("
-")"
-"Ljava/lang/String;");
- if (g_Test_testStaticMethodWithNoParam == NULL) {
- return false;
- }
-
- return true;
-}
-
-extern "C" JNIEXPORT bool JNICALL
-Java_org_chromium_example_jni_generator_Test_nativeInitNativeClass(JNIEnv* env,
- jclass clazz) {
- return RegisterNativesImpl(env, clazz);
-}
-
-#endif // org_chromium_example_jni_generator_Test_JNI
« no previous file with comments | « base/android/jni_generator/jni_generator_tests.py ('k') | base/android/jni_generator/testJNIInitNativeNameOption.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698