| 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/TestJni | 8 // org/chromium/TestJni |
| 9 | 9 |
| 10 #ifndef org_chromium_TestJni_JNI | 10 #ifndef org_chromium_TestJni_JNI |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 static const JNINativeMethod kMethodsTestJni[] = { | 63 static const JNINativeMethod kMethodsTestJni[] = { |
| 64 { "nativeInit", | 64 { "nativeInit", |
| 65 "(" | 65 "(" |
| 66 ")" | 66 ")" |
| 67 "I", reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeInit) }, | 67 "I", reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeInit) }, |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 static bool RegisterNativesImpl(JNIEnv* env) { | 70 static bool RegisterNativesImpl(JNIEnv* env) { |
| 71 if (base::android::IsManualJniRegistrationDisabled()) return true; | 71 if (base::android::IsManualJniRegistrationDisabled()) return true; |
| 72 base::android::LibraryProcessType proc_type = |
| 73 base::android::GetLibraryProcessType(env); |
| 74 if (proc_type != base::android::PROCESS_BROWSER && |
| 75 proc_type != base::android::PROCESS_UNINITIALIZED) { |
| 76 return true; |
| 77 } |
| 72 | 78 |
| 73 const int kMethodsMyOtherInnerClassSize = | 79 const int kMethodsMyOtherInnerClassSize = |
| 74 arraysize(kMethodsMyOtherInnerClass); | 80 arraysize(kMethodsMyOtherInnerClass); |
| 75 | 81 |
| 76 if (env->RegisterNatives(MyOtherInnerClass_clazz(env), | 82 if (env->RegisterNatives(MyOtherInnerClass_clazz(env), |
| 77 kMethodsMyOtherInnerClass, | 83 kMethodsMyOtherInnerClass, |
| 78 kMethodsMyOtherInnerClassSize) < 0) { | 84 kMethodsMyOtherInnerClassSize) < 0) { |
| 79 jni_generator::HandleRegistrationError( | 85 jni_generator::HandleRegistrationError( |
| 80 env, MyOtherInnerClass_clazz(env), __FILE__); | 86 env, MyOtherInnerClass_clazz(env), __FILE__); |
| 81 return false; | 87 return false; |
| 82 } | 88 } |
| 83 | 89 |
| 84 const int kMethodsTestJniSize = arraysize(kMethodsTestJni); | 90 const int kMethodsTestJniSize = arraysize(kMethodsTestJni); |
| 85 | 91 |
| 86 if (env->RegisterNatives(TestJni_clazz(env), | 92 if (env->RegisterNatives(TestJni_clazz(env), |
| 87 kMethodsTestJni, | 93 kMethodsTestJni, |
| 88 kMethodsTestJniSize) < 0) { | 94 kMethodsTestJniSize) < 0) { |
| 89 jni_generator::HandleRegistrationError( | 95 jni_generator::HandleRegistrationError( |
| 90 env, TestJni_clazz(env), __FILE__); | 96 env, TestJni_clazz(env), __FILE__); |
| 91 return false; | 97 return false; |
| 92 } | 98 } |
| 93 | 99 |
| 94 return true; | 100 return true; |
| 95 } | 101 } |
| 96 | 102 |
| 97 #endif // org_chromium_TestJni_JNI | 103 #endif // org_chromium_TestJni_JNI |
| OLD | NEW |