android_library_loader_hooks.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
15f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer// Use of this source code is governed by a BSD-style license that can be 35f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer// found in the LICENSE file. 45f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer 50bc735ffcfb223c0186419547abaa5c84482663eChris Lattner#ifndef CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_ 60bc735ffcfb223c0186419547abaa5c84482663eChris Lattner#define CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_ 75f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer 85f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer#include <jni.h> 9010bfc253050626435f006386c0bee4b55329687James Dennett 10010bfc253050626435f006386c0bee4b55329687James Dennett#include "base/basictypes.h" 11010bfc253050626435f006386c0bee4b55329687James Dennett#include "content/common/content_export.h" 12010bfc253050626435f006386c0bee4b55329687James Dennett 135f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencernamespace content { 145f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer 155f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer// Registers the callbacks that allows the entry point of the library to be 165f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer// exposed to the calling java code. This handles only registering the content 175f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer// specific callbacks. Any application specific JNI bindings should happen 18478851c3ed6bd784e7377dffd8e57b200c1b9ba9Benjamin Kramer// once the native library has fully loaded. 195f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid SpencerCONTENT_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env); 20d5532b6cfff2977e0c59fa6ead7f7973984a620dJohn McCall 2130a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth// Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread 2201d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor// created. 236bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen HinesCONTENT_EXPORT void LibraryLoaderExitHook(); 2401d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor 25aa49a7d70e58dac2aeb40664ba16d2ea571b8c95Daniel Dunbar} // namespace content 265f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer 275f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer#endif // CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_ 285f016e2cb5d11daeb237544de1c5d59f20fe1a6eReid Spencer