99188
r=ashuk a=edburns re-implement prompt for cookies. Modified Files: CBrowserContainer.cpp PromptActionEvents.cpp ns_util.cpp ns_util.h git-svn-id: svn://10.0.0.236/trunk@102852 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -30,6 +30,14 @@
|
||||
|
||||
#include "ns_util.h"
|
||||
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
#define kCommonDialogsProperties "chrome://global/locale/commonDialogs.properties"
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* a null terminated array of listener interfaces we support. This is
|
||||
@@ -146,6 +154,25 @@ jint util_GetGTKWinPtrFromCanvas(JNIEnv *env, jobject browserControlCanvas)
|
||||
}
|
||||
#endif
|
||||
|
||||
nsresult util_GetLocaleString(const char *aKey, PRUnichar **aResult)
|
||||
{
|
||||
#ifdef BAL_INTERFACE
|
||||
#else
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID);
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
|
||||
rv = stringService->CreateBundle(kCommonDialogsProperties, getter_AddRefs(stringBundle));
|
||||
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
|
||||
|
||||
rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2(aKey).GetUnicode(), aResult);
|
||||
|
||||
return rv;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Implementations for functions defined in ../src_share/jni_util.h, but not
|
||||
// implemented there.
|
||||
|
||||
Reference in New Issue
Block a user