jni_utils.cc 966 B

1234567891011121314151617181920212223242526272829303132
  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
  3. // found in the LICENSE file.
  4. #include "base/android/jni_utils.h"
  5. #include "base/android/jni_string.h"
  6. #include "base/android/scoped_java_ref.h"
  7. #include "base/base_jni_headers/JNIUtils_jni.h"
  8. namespace base {
  9. namespace android {
  10. ScopedJavaLocalRef<jobject> GetClassLoader(JNIEnv* env) {
  11. return Java_JNIUtils_getSplitClassLoader(env,
  12. ConvertUTF8ToJavaString(env, ""));
  13. }
  14. ScopedJavaLocalRef<jobject> GetSplitClassLoader(JNIEnv* env,
  15. const std::string& split_name) {
  16. return Java_JNIUtils_getSplitClassLoader(
  17. env, ConvertUTF8ToJavaString(env, split_name));
  18. }
  19. bool IsSelectiveJniRegistrationEnabled(JNIEnv* env) {
  20. return Java_JNIUtils_isSelectiveJniRegistrationEnabled(env);
  21. }
  22. } // namespace android
  23. } // namespace base