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

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

Issue 2501193003: Selectively perform JNI registration in render processes on Android. (Closed)
Patch Set: Address Ted C comments Created 3 years, 10 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
« no previous file with comments | « base/android/jni_android.cc ('k') | base/android/jni_generator/jni_generator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 { "nativeReturnAString", 476 { "nativeReturnAString",
477 "(" 477 "("
478 "J" 478 "J"
479 ")" 479 ")"
480 "Ljava/lang/String;", 480 "Ljava/lang/String;",
481 reinterpret_cast<void*>(Java_org_chromium_example_jni_1generator_SampleForTe sts_nativeReturnAString) 481 reinterpret_cast<void*>(Java_org_chromium_example_jni_1generator_SampleForTe sts_nativeReturnAString)
482 }, 482 },
483 }; 483 };
484 484
485 static bool RegisterNativesImpl(JNIEnv* env) { 485 static bool RegisterNativesImpl(JNIEnv* env) {
486 if (base::android::IsManualJniRegistrationDisabled()) return true; 486 if (jni_generator::ShouldSkipJniRegistration(false))
487 return true;
487 488
488 const int kMethodsInnerClassSize = arraysize(kMethodsInnerClass); 489 const int kMethodsInnerClassSize = arraysize(kMethodsInnerClass);
489 490
490 if (env->RegisterNatives(InnerClass_clazz(env), 491 if (env->RegisterNatives(InnerClass_clazz(env),
491 kMethodsInnerClass, 492 kMethodsInnerClass,
492 kMethodsInnerClassSize) < 0) { 493 kMethodsInnerClassSize) < 0) {
493 jni_generator::HandleRegistrationError( 494 jni_generator::HandleRegistrationError(
494 env, InnerClass_clazz(env), __FILE__); 495 env, InnerClass_clazz(env), __FILE__);
495 return false; 496 return false;
496 } 497 }
497 498
498 const int kMethodsSampleForTestsSize = arraysize(kMethodsSampleForTests); 499 const int kMethodsSampleForTestsSize = arraysize(kMethodsSampleForTests);
499 500
500 if (env->RegisterNatives(SampleForTests_clazz(env), 501 if (env->RegisterNatives(SampleForTests_clazz(env),
501 kMethodsSampleForTests, 502 kMethodsSampleForTests,
502 kMethodsSampleForTestsSize) < 0) { 503 kMethodsSampleForTestsSize) < 0) {
503 jni_generator::HandleRegistrationError( 504 jni_generator::HandleRegistrationError(
504 env, SampleForTests_clazz(env), __FILE__); 505 env, SampleForTests_clazz(env), __FILE__);
505 return false; 506 return false;
506 } 507 }
507 508
508 return true; 509 return true;
509 } 510 }
510 511
511 } // namespace android 512 } // namespace android
512 } // namespace base 513 } // namespace base
513 514
514 #endif // org_chromium_example_jni_generator_SampleForTests_JNI 515 #endif // org_chromium_example_jni_generator_SampleForTests_JNI
OLDNEW
« no previous file with comments | « base/android/jni_android.cc ('k') | base/android/jni_generator/jni_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698