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

Side by Side Diff: base/android/jni_generator/testEagerCalledByNativesOption.golden

Issue 1308363003: Revert of jni_generator: Make all object-returning natives return ScopedJavaLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is autogenerated by 5 // This file is autogenerated by
6 // base/android/jni_generator/jni_generator.py 6 // base/android/jni_generator/jni_generator.py
7 // For 7 // For
8 // org/chromium/example/jni_generator/Test 8 // org/chromium/example/jni_generator/Test
9 9
10 #ifndef org_chromium_example_jni_generator_Test_JNI 10 #ifndef org_chromium_example_jni_generator_Test_JNI
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 g_Test_testStaticMethodWithParam, as_jint(iParam)); 53 g_Test_testStaticMethodWithParam, as_jint(iParam));
54 return ret; 54 return ret;
55 } 55 }
56 56
57 static jdouble testMethodWithNoParam(JNIEnv* env) { 57 static jdouble testMethodWithNoParam(JNIEnv* env) {
58 jdouble ret = env->CallStaticDoubleMethod(Test_clazz(env), 58 jdouble ret = env->CallStaticDoubleMethod(Test_clazz(env),
59 g_Test_testMethodWithNoParam); 59 g_Test_testMethodWithNoParam);
60 return ret; 60 return ret;
61 } 61 }
62 62
63 static ScopedJavaLocalRef<jstring> testStaticMethodWithNoParam(JNIEnv* env) { 63 static base::android::ScopedJavaLocalRef<jstring>
64 testStaticMethodWithNoParam(JNIEnv* env) {
64 jstring ret = 65 jstring ret =
65 static_cast<jstring>(env->CallStaticObjectMethod(Test_clazz(env), 66 static_cast<jstring>(env->CallStaticObjectMethod(Test_clazz(env),
66 g_Test_testStaticMethodWithNoParam)); 67 g_Test_testStaticMethodWithNoParam));
67 return ScopedJavaLocalRef<jstring>(env, ret); 68 return base::android::ScopedJavaLocalRef<jstring>(env, ret);
68 } 69 }
69 } // namespace 70 } // namespace
70 71
71 // Step 3: RegisterNatives. 72 // Step 3: RegisterNatives.
72 73
73 static const JNINativeMethod kMethodsTest[] = { 74 static const JNINativeMethod kMethodsTest[] = {
74 { "nativeMethod", 75 { "nativeMethod",
75 "(" 76 "("
76 "J" 77 "J"
77 "I" 78 "I"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return true; 141 return true;
141 } 142 }
142 143
143 extern "C" JNIEXPORT bool JNICALL 144 extern "C" JNIEXPORT bool JNICALL
144 Java_org_chromium_example_jni_generator_Test_nativeInitNativeClass(JNIEnv* env, 145 Java_org_chromium_example_jni_generator_Test_nativeInitNativeClass(JNIEnv* env,
145 jclass clazz) { 146 jclass clazz) {
146 return RegisterNativesImpl(env, clazz); 147 return RegisterNativesImpl(env, clazz);
147 } 148 }
148 149
149 #endif // org_chromium_example_jni_generator_Test_JNI 150 #endif // org_chromium_example_jni_generator_Test_JNI
OLDNEW
« no previous file with comments | « base/android/jni_generator/testConstantsFromJavaP.golden ('k') | base/android/jni_generator/testFromJavaP.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698