summaryrefslogtreecommitdiffstats
path: root/content/public/app
diff options
context:
space:
mode:
authortorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-04 12:25:43 +0000
committertorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-04 12:25:43 +0000
commit7661da4d5a7c4ba292e5b95d478d7f9b5c94bfe5 (patch)
tree74556052716999a9eae5ab0c17b9e33c82c0b88d /content/public/app
parentef9787fd126f3759790ab051c0645d585b4c2fe9 (diff)
downloadchromium_src-7661da4d5a7c4ba292e5b95d478d7f9b5c94bfe5.zip
chromium_src-7661da4d5a7c4ba292e5b95d478d7f9b5c94bfe5.tar.gz
chromium_src-7661da4d5a7c4ba292e5b95d478d7f9b5c94bfe5.tar.bz2
Allow JNI registration to be performed eagerly.
Add a content API function which allows JNI registration to be performed immediately during JNI_OnLoad, instead of always being deferred until LibraryLoaded. Add a call to this new API in android_webview's entry point, since it benefits from the eager registration by allowing more pages to be shared, and for certain JNI functions to be called without starting all of Chromium (e.g. to enable AwCookieManager). BUG=304813 Review URL: https://codereview.chromium.org/50493015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/app')
-rw-r--r--content/public/app/android_library_loader_hooks.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/public/app/android_library_loader_hooks.h b/content/public/app/android_library_loader_hooks.h
index c4bec7e..a980005 100644
--- a/content/public/app/android_library_loader_hooks.h
+++ b/content/public/app/android_library_loader_hooks.h
@@ -18,6 +18,11 @@ namespace content {
// once the native library has fully loaded.
CONTENT_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env);
+// Register all content JNI functions now, rather than waiting for the process
+// of fully loading the native library to complete. This must only be called
+// during JNI_OnLoad.
+CONTENT_EXPORT bool EnsureJniRegistered(JNIEnv* env);
+
// Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread
// created.
CONTENT_EXPORT void LibraryLoaderExitHook();