OLD | NEW |
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/SampleForTests | 8 // org/chromium/example/jni_generator/SampleForTests |
9 | 9 |
10 #ifndef org_chromium_example_jni_generator_SampleForTests_JNI | 10 #ifndef org_chromium_example_jni_generator_SampleForTests_JNI |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 ")" | 366 ")" |
367 "V", reinterpret_cast<void*>(IterateAndDoSomethingWithStructB) }, | 367 "V", reinterpret_cast<void*>(IterateAndDoSomethingWithStructB) }, |
368 { "nativeReturnAString", | 368 { "nativeReturnAString", |
369 "(" | 369 "(" |
370 "J" | 370 "J" |
371 ")" | 371 ")" |
372 "Ljava/lang/String;", reinterpret_cast<void*>(ReturnAString) }, | 372 "Ljava/lang/String;", reinterpret_cast<void*>(ReturnAString) }, |
373 }; | 373 }; |
374 | 374 |
375 static bool RegisterNativesImpl(JNIEnv* env) { | 375 static bool RegisterNativesImpl(JNIEnv* env) { |
| 376 |
376 g_InnerStructA_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( | 377 g_InnerStructA_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( |
377 base::android::GetClass(env, kInnerStructAClassPath).obj())); | 378 base::android::GetClass(env, kInnerStructAClassPath).obj())); |
378 g_SampleForTests_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( | 379 g_SampleForTests_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( |
379 base::android::GetClass(env, kSampleForTestsClassPath).obj())); | 380 base::android::GetClass(env, kSampleForTestsClassPath).obj())); |
380 g_InnerStructB_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( | 381 g_InnerStructB_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( |
381 base::android::GetClass(env, kInnerStructBClassPath).obj())); | 382 base::android::GetClass(env, kInnerStructBClassPath).obj())); |
382 | 383 |
383 const int kMethodsSampleForTestsSize = arraysize(kMethodsSampleForTests); | 384 const int kMethodsSampleForTestsSize = arraysize(kMethodsSampleForTests); |
384 | 385 |
385 if (env->RegisterNatives(SampleForTests_clazz(env), | 386 if (env->RegisterNatives(SampleForTests_clazz(env), |
386 kMethodsSampleForTests, | 387 kMethodsSampleForTests, |
387 kMethodsSampleForTestsSize) < 0) { | 388 kMethodsSampleForTestsSize) < 0) { |
388 jni_generator::HandleRegistrationError( | 389 jni_generator::HandleRegistrationError( |
389 env, SampleForTests_clazz(env), __FILE__); | 390 env, SampleForTests_clazz(env), __FILE__); |
390 return false; | 391 return false; |
391 } | 392 } |
392 | 393 |
393 return true; | 394 return true; |
394 } | 395 } |
395 | 396 |
396 } // namespace android | 397 } // namespace android |
397 } // namespace base | 398 } // namespace base |
398 | 399 |
399 #endif // org_chromium_example_jni_generator_SampleForTests_JNI | 400 #endif // org_chromium_example_jni_generator_SampleForTests_JNI |
OLD | NEW |