android_library_loader_hooks.h revision 0f1bc08d4cfcc34181b0b5cbf065c40f687bf740
1// Copyright (c) 2012 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
5#ifndef CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_
6#define CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_
7
8#include <jni.h>
9
10#include "base/basictypes.h"
11#include "content/common/content_export.h"
12
13namespace content {
14
15// Registers the callbacks that allows the entry point of the library to be
16// exposed to the calling java code.  This handles only registering the content
17// specific callbacks.  Any application specific JNI bindings should happen
18// once the native library has fully loaded.
19CONTENT_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env);
20
21// Register all content JNI functions now, rather than waiting for the process
22// of fully loading the native library to complete.  This must only be called
23// during JNI_OnLoad.
24CONTENT_EXPORT bool EnsureJniRegistered(JNIEnv* env);
25
26// Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread
27// created.
28CONTENT_EXPORT void LibraryLoaderExitHook();
29
30}  // namespace content
31
32#endif  // CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_
33