Index: base/android/jni_android.h |
diff --git a/base/android/jni_android.h b/base/android/jni_android.h |
index 96746539b28c24322abdfb0bb7170dcfadaadf2c..b4f2b4d3462c0e22d19f2a18851fa6632612c0f3 100644 |
--- a/base/android/jni_android.h |
+++ b/base/android/jni_android.h |
@@ -54,13 +54,27 @@ namespace android { |
// Used to mark symbols to be exported in a shared library's symbol table. |
#define JNI_EXPORT __attribute__ ((visibility("default"))) |
+// The level of JNI registration required for the current process. |
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.base |
+enum JniRegistrationType { |
+ // Indicates the JNI registration type hasn't yet been set. |
+ UNINITIALIZED_JNI_REGISTRATION, |
+ // Register all native methods. |
+ ALL_JNI_REGISTRATION, |
+ // Register some native methods, as controlled by the jni_generator. |
+ SELECTIVE_JNI_REGISTRATION, |
+ // Do not register any native methods. |
+ NO_JNI_REGISTRATION, |
+}; |
+ |
// 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(); |
+// JNI exports for startup performance. Call DisableManualJniRegistration at |
+// the very beginning of JNI_OnLoad to use this. |
BASE_EXPORT void DisableManualJniRegistration(); |
Torne
2017/01/30 12:29:56
So with this change we do all registration by defa
estevenson
2017/01/30 19:19:27
We could remove JniRegistrationType from the Java
|
+// Gets the JniRegistrationType from Java and caches it on the native side. |
+BASE_EXPORT JniRegistrationType FetchJniRegistrationType(); |
+ |
// Contains the registration method information for initializing JNI bindings. |
struct RegistrationMethod { |
const char* name; |