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

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

Issue 2162923002: jni_generator: Always generate native exports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 // java/io/InputStream 8 // java/io/InputStream
9 9
10 #ifndef java_io_InputStream_JNI 10 #ifndef java_io_InputStream_JNI
11 #define java_io_InputStream_JNI 11 #define java_io_InputStream_JNI
12 12
13 #include <jni.h> 13 #include <jni.h>
14 14
15 #include "base/android/jni_generator/jni_generator_helper.h" 15 #include "base/android/jni_generator/jni_generator_helper.h"
16 16
17 #include "base/android/jni_int_wrapper.h" 17 #include "base/android/jni_int_wrapper.h"
18 18
19 // Step 1: forward declarations. 19 // Step 1: forward declarations.
20 namespace { 20 namespace {
21 const char kInputStreamClassPath[] = "java/io/InputStream"; 21 const char kInputStreamClassPath[] = "java/io/InputStream";
22 // Leaking this jclass as we cannot use LazyInstance from some threads. 22 // Leaking this jclass as we cannot use LazyInstance from some threads.
23 jclass g_InputStream_clazz = NULL; 23 base::subtle::AtomicWord g_InputStream_clazz __attribute__((unused)) = 0;
24 #define InputStream_clazz(env) g_InputStream_clazz 24 #define InputStream_clazz(env) base::android::LazyGetClass(env, kInputStreamClas sPath, &g_InputStream_clazz)
25 25
26 } // namespace 26 } // namespace
27 27
28 namespace JNI_InputStream { 28 namespace JNI_InputStream {
29 29
30 // Step 2: method stubs. 30 // Step 2: method stubs.
31 31
32 static base::subtle::AtomicWord g_InputStream_available = 0; 32 static base::subtle::AtomicWord g_InputStream_available = 0;
33 static jint Java_InputStream_available(JNIEnv* env, jobject obj) __attribute__ 33 static jint Java_InputStream_available(JNIEnv* env, jobject obj) __attribute__
34 ((unused)); 34 ((unused));
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 jobject ret = 247 jobject ret =
248 env->NewObject(InputStream_clazz(env), 248 env->NewObject(InputStream_clazz(env),
249 method_id); 249 method_id);
250 jni_generator::CheckException(env); 250 jni_generator::CheckException(env);
251 return ScopedJavaLocalRef<jobject>(env, ret); 251 return ScopedJavaLocalRef<jobject>(env, ret);
252 } 252 }
253 253
254 // Step 3: RegisterNatives. 254 // Step 3: RegisterNatives.
255 255
256 static bool RegisterNativesImpl(JNIEnv* env) { 256 static bool RegisterNativesImpl(JNIEnv* env) {
257 257 if (base::android::IsManualJniRegistrationDisabled()) return true;
258 g_InputStream_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
259 base::android::GetClass(env, kInputStreamClassPath).obj()));
260 258
261 return true; 259 return true;
262 } 260 }
263 261
264 } // namespace JNI_InputStream 262 } // namespace JNI_InputStream
265 263
266 #endif // java_io_InputStream_JNI 264 #endif // java_io_InputStream_JNI
OLDNEW
« no previous file with comments | « base/android/jni_generator/testConstantsFromJavaP.golden ('k') | base/android/jni_generator/testFromJavaPGenerics.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698