Bug 323231 - Expose new XRE Profile APIs to Java embedders. r=jhpedemonte/bsmedberg

This commit is contained in:
pedemont@us.ibm.com
2006-06-09 13:40:08 +00:00
parent 0134cdab03
commit b3e6053162
7 changed files with 131 additions and 1 deletions

View File

@@ -72,6 +72,8 @@ JNI_OnUnload(JavaVM* vm, void* reserved)
enum {
kFunc_InitEmbedding,
kFunc_TermEmbedding,
kFunc_LockProfileDirectory,
kFunc_NotifyProfile,
kFunc_InitXPCOM,
kFunc_ShutdownXPCOM,
kFunc_GetComponentManager,
@@ -83,7 +85,7 @@ enum {
kFunc_IsSameXPCOMObject
};
#define JX_NUM_FUNCS 11
#define JX_NUM_FUNCS 13
// Get path string from java.io.File object.
@@ -131,6 +133,10 @@ LoadXULMethods(JNIEnv* env, jobject aXPCOMPath, void** aFunctions)
(NSFuncPtr*) &aFunctions[kFunc_InitEmbedding] },
{ "Java_org_mozilla_xpcom_internal_GREImpl_termEmbedding",
(NSFuncPtr*) &aFunctions[kFunc_TermEmbedding] },
{ "Java_org_mozilla_xpcom_internal_GREImpl_lockProfileDirectory",
(NSFuncPtr*) &aFunctions[kFunc_LockProfileDirectory] },
{ "Java_org_mozilla_xpcom_internal_GREImpl_notifyProfile",
(NSFuncPtr*) &aFunctions[kFunc_NotifyProfile] },
{ "Java_org_mozilla_xpcom_internal_XPCOMImpl_initXPCOM",
(NSFuncPtr*) &aFunctions[kFunc_InitXPCOM] },
{ "Java_org_mozilla_xpcom_internal_XPCOMImpl_shutdownXPCOM",
@@ -210,6 +216,10 @@ RegisterNativeMethods(JNIEnv* env, void** aFunctions)
(void*) aFunctions[kFunc_InitEmbedding] },
{ "termEmbedding", "()V",
(void*) aFunctions[kFunc_TermEmbedding] },
{ "lockProfileDirectory", "(Ljava/io/File;)Lorg/mozilla/xpcom/nsISupports;",
(void*) aFunctions[kFunc_LockProfileDirectory] },
{ "notifyProfile", "()V",
(void*) aFunctions[kFunc_NotifyProfile] },
};
JNINativeMethod xpcom_methods[] = {