Index: base/android/jni_android.h |
diff --git a/base/android/jni_android.h b/base/android/jni_android.h |
index 96746539b28c24322abdfb0bb7170dcfadaadf2c..9c3eb656fbc5d50dd3b01e66c9c812b5f198bb0f 100644 |
--- a/base/android/jni_android.h |
+++ b/base/android/jni_android.h |
@@ -54,12 +54,22 @@ namespace android { |
// Used to mark symbols to be exported in a shared library's symbol table. |
#define JNI_EXPORT __attribute__ ((visibility("default"))) |
-// Used to disable manual JNI registration in binaries that prefer to use native |
-// JNI exports for startup performance. This is not compatible with the crazy |
-// linker and so defaults to off. Call DisableManualJniRegistration at the very |
-// beginning of JNI_OnLoad to use this. |
-BASE_EXPORT bool IsManualJniRegistrationDisabled(); |
-BASE_EXPORT void DisableManualJniRegistration(); |
+// The level of JNI registration required. |
+enum JniRegistrationType { |
+ // Indicates the JNI registration type hasn't yet been set. |
+ UNINITIALIZED_JNI_REGISTRATION, |
+ // Register all native functions. |
+ ALL_JNI_REGISTRATION, |
+ // Register some native functions, as controlled by the jni_generator. |
+ SELECTIVE_JNI_REGISTRATION, |
+ // Do not register any native functions. |
+ NO_JNI_REGISTRATION, |
+}; |
+ |
+// Determine the type of JNI registration to complete. |
+BASE_EXPORT void InitJniRegistrationType(JNIEnv* env, bool force_registration); |
+ |
+BASE_EXPORT JniRegistrationType GetJniRegistrationType(); |
// Contains the registration method information for initializing JNI bindings. |
struct RegistrationMethod { |