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

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

Issue 2204623002: Android: Don't require RegisterNatives if there are none (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/foo/Foo 8 // org/chromium/foo/Foo
9 9
10 #ifndef org_chromium_foo_Foo_JNI 10 #ifndef org_chromium_foo_Foo_JNI
(...skipping 25 matching lines...) Expand all
36 jobject callback1, 36 jobject callback1,
37 jobject callback2) { 37 jobject callback2) {
38 return DoSomething(env, JavaParamRef<jclass>(env, jcaller), 38 return DoSomething(env, JavaParamRef<jclass>(env, jcaller),
39 JavaParamRef<jobject>(env, callback1), JavaParamRef<jobject>(env, 39 JavaParamRef<jobject>(env, callback1), JavaParamRef<jobject>(env,
40 callback2)); 40 callback2));
41 } 41 }
42 42
43 static base::subtle::AtomicWord g_Foo_calledByNative = 0; 43 static base::subtle::AtomicWord g_Foo_calledByNative = 0;
44 static void Java_Foo_calledByNative(JNIEnv* env, jobject callback1, 44 static void Java_Foo_calledByNative(JNIEnv* env, jobject callback1,
45 jobject callback2) { 45 jobject callback2) {
46 /* Must call RegisterNativesImpl() */
47 CHECK_CLAZZ(env, Foo_clazz(env), 46 CHECK_CLAZZ(env, Foo_clazz(env),
48 Foo_clazz(env)); 47 Foo_clazz(env));
49 jmethodID method_id = 48 jmethodID method_id =
50 base::android::MethodID::LazyGet< 49 base::android::MethodID::LazyGet<
51 base::android::MethodID::TYPE_STATIC>( 50 base::android::MethodID::TYPE_STATIC>(
52 env, Foo_clazz(env), 51 env, Foo_clazz(env),
53 "calledByNative", 52 "calledByNative",
54 53
55 "(" 54 "("
56 "Lorg/chromium/foo/Bar1$Callback;" 55 "Lorg/chromium/foo/Bar1$Callback;"
(...skipping 29 matching lines...) Expand all
86 kMethodsFooSize) < 0) { 85 kMethodsFooSize) < 0) {
87 jni_generator::HandleRegistrationError( 86 jni_generator::HandleRegistrationError(
88 env, Foo_clazz(env), __FILE__); 87 env, Foo_clazz(env), __FILE__);
89 return false; 88 return false;
90 } 89 }
91 90
92 return true; 91 return true;
93 } 92 }
94 93
95 #endif // org_chromium_foo_Foo_JNI 94 #endif // org_chromium_foo_Foo_JNI
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698