Commit 1797e4af authored by Tatiana Meshkova's avatar Tatiana Meshkova

Switch API from PRUnichar to char16_t, to be compatible with upstream API

parent f7f0b8de
......@@ -69,7 +69,7 @@ EmbedChromeManager::Init()
NS_IMETHODIMP
EmbedChromeManager::Observe(nsISupports *aSubject,
const char *aTopic,
const PRUnichar *aData)
const char16_t *aData)
{
nsresult rv;
if (!strcmp(aTopic, "domwindowopened")) {
......
......@@ -174,7 +174,7 @@ EmbedHistoryListener::SetURITitle(nsIURI *aURI, const nsAString& aTitle)
NS_IMETHODIMP
EmbedHistoryListener::Observe(nsISupports *aSubject,
const char *aTopic,
const PRUnichar *aData)
const char16_t *aData)
{
if (!strcmp(aTopic, "history:notifyVisited")) {
sHistory->mPendingURIs.Push(NS_ConvertUTF16toUTF8(aData));
......
......@@ -97,7 +97,7 @@ EmbedPromptRegister::Init()
NS_IMETHODIMP
EmbedPromptRegister::Observe(nsISupports *aSubject,
const char *aTopic,
const PRUnichar *aData)
const char16_t *aData)
{
return NS_OK;
}
......@@ -61,7 +61,7 @@ NS_IMPL_ISUPPORTS2(EmbedPromptOuterObserver, nsIObserver, nsSupportsWeakReferenc
NS_IMETHODIMP
EmbedPromptOuterObserver::Observe(nsISupports *aSubject,
const char *aTopic,
const PRUnichar *aData)
const char16_t *aData)
{
if (!strcmp(aTopic, "outer-window-destroyed")) {
OnDestroy();
......@@ -135,8 +135,8 @@ EmbedPromptService::~EmbedPromptService()
NS_IMPL_ISUPPORTS2(EmbedPromptService, nsIPrompt, nsIEmbedMessageListener)
NS_IMETHODIMP
EmbedPromptService::Alert(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText)
EmbedPromptService::Alert(const char16_t* aDialogTitle,
const char16_t* aDialogText)
{
AlertCheck(aDialogTitle, aDialogText, nullptr, nullptr);
return NS_OK;
......@@ -152,7 +152,7 @@ EmbedPromptService::CancelResponse()
}
NS_IMETHODIMP
EmbedPromptService::OnMessageReceived(const char* messageName, const PRUnichar* message)
EmbedPromptService::OnMessageReceived(const char* messageName, const char16_t* message)
{
nsCOMPtr<nsIEmbedLiteJSON> json = do_GetService("@mozilla.org/embedlite-json;1");
nsCOMPtr<nsIPropertyBag2> root;
......@@ -203,9 +203,9 @@ EmbedAuthPromptService::CheckWinID()
NS_IMETHODIMP
EmbedPromptService::AlertCheck(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText,
const PRUnichar* aCheckMsg, bool* aCheckValue)
EmbedPromptService::AlertCheck(const char16_t* aDialogTitle,
const char16_t* aDialogText,
const char16_t* aCheckMsg, bool* aCheckValue)
{
uint32_t winid;
mService->GetIDByWindow(mWin, &winid);
......@@ -274,8 +274,8 @@ EmbedPromptService::AlertCheck(const PRUnichar* aDialogTitle,
}
NS_IMETHODIMP
EmbedPromptService::Confirm(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText, bool* aConfirm)
EmbedPromptService::Confirm(const char16_t* aDialogTitle,
const char16_t* aDialogText, bool* aConfirm)
{
ConfirmCheck(aDialogTitle,
aDialogText, nullptr, nullptr, aConfirm);
......@@ -283,9 +283,9 @@ EmbedPromptService::Confirm(const PRUnichar* aDialogTitle,
}
NS_IMETHODIMP
EmbedPromptService::ConfirmCheck(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText,
const PRUnichar* aCheckMsg,
EmbedPromptService::ConfirmCheck(const char16_t* aDialogTitle,
const char16_t* aDialogText,
const char16_t* aCheckMsg,
bool* aCheckValue, bool* aConfirm)
{
uint32_t winid;
......@@ -363,13 +363,13 @@ EmbedPromptService::ConfirmCheck(const PRUnichar* aDialogTitle,
}
NS_IMETHODIMP
EmbedPromptService::ConfirmEx(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText,
EmbedPromptService::ConfirmEx(const char16_t* aDialogTitle,
const char16_t* aDialogText,
PRUint32 aButtonFlags,
const PRUnichar* aButton0Title,
const PRUnichar* aButton1Title,
const PRUnichar* aButton2Title,
const PRUnichar* aCheckMsg, bool* aCheckValue,
const char16_t* aButton0Title,
const char16_t* aButton1Title,
const char16_t* aButton2Title,
const char16_t* aCheckMsg, bool* aCheckValue,
PRInt32* aRetVal)
{
// LOGNI();
......@@ -377,9 +377,9 @@ EmbedPromptService::ConfirmEx(const PRUnichar* aDialogTitle,
}
NS_IMETHODIMP
EmbedPromptService::Prompt(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText, PRUnichar** aValue,
const PRUnichar* aCheckMsg, bool* aCheckValue,
EmbedPromptService::Prompt(const char16_t* aDialogTitle,
const char16_t* aDialogText, char16_t** aValue,
const char16_t* aCheckMsg, bool* aCheckValue,
bool* aConfirm)
{
uint32_t winid;
......@@ -465,11 +465,11 @@ EmbedPromptService::Prompt(const PRUnichar* aDialogTitle,
}
NS_IMETHODIMP
EmbedPromptService::PromptUsernameAndPassword(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText,
PRUnichar** aUsername,
PRUnichar** aPassword,
const PRUnichar* aCheckMsg,
EmbedPromptService::PromptUsernameAndPassword(const char16_t* aDialogTitle,
const char16_t* aDialogText,
char16_t** aUsername,
char16_t** aPassword,
const char16_t* aCheckMsg,
bool* aCheckValue,
bool* aConfirm)
{
......@@ -478,10 +478,10 @@ EmbedPromptService::PromptUsernameAndPassword(const PRUnichar* aDialogTitle,
}
NS_IMETHODIMP
EmbedPromptService::PromptPassword(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText,
PRUnichar** aPassword,
const PRUnichar* aCheckMsg,
EmbedPromptService::PromptPassword(const char16_t* aDialogTitle,
const char16_t* aDialogText,
char16_t** aPassword,
const char16_t* aCheckMsg,
bool* aCheckValue, bool* aConfirm)
{
// LOGNI();
......@@ -489,9 +489,9 @@ EmbedPromptService::PromptPassword(const PRUnichar* aDialogTitle,
}
NS_IMETHODIMP
EmbedPromptService::Select(const PRUnichar* aDialogTitle,
const PRUnichar* aDialogText, PRUint32 aCount,
const PRUnichar** aSelectList, PRInt32* outSelection,
EmbedPromptService::Select(const char16_t* aDialogTitle,
const char16_t* aDialogText, PRUint32 aCount,
const char16_t** aSelectList, PRInt32* outSelection,
bool* aConfirm)
{
// LOGNI();
......@@ -770,7 +770,7 @@ EmbedAuthPromptService::DoSendAsyncPrompt(EmbedAsyncAuthPrompt* mPrompt)
}
NS_IMETHODIMP
EmbedAuthPromptService::OnMessageReceived(const char* messageName, const PRUnichar* message)
EmbedAuthPromptService::OnMessageReceived(const char* messageName, const char16_t* message)
{
nsCOMPtr<nsIEmbedLiteJSON> json = do_GetService("@mozilla.org/embedlite-json;1");
nsCOMPtr<nsIPropertyBag2> root;
......
......@@ -73,7 +73,7 @@ EmbedTouchManager::Init()
NS_IMETHODIMP
EmbedTouchManager::Observe(nsISupports *aSubject,
const char *aTopic,
const PRUnichar *aData)
const char16_t *aData)
{
nsresult rv;
if (!strcmp(aTopic, "embedliteviewcreated")) {
......
......@@ -110,7 +110,7 @@ nsEmbedClipboard::GetData(nsITransferable* aTransferable, int32_t aWhichClipboar
nsCOMPtr<nsISupports> nsisupportsDataWrapper =
do_QueryInterface(dataWrapper);
rv = aTransferable->SetTransferData(kUnicodeMime, nsisupportsDataWrapper,
mBuffer.Length() * sizeof(PRUnichar));
mBuffer.Length() * sizeof(char16_t));
NS_ENSURE_SUCCESS(rv, rv);
mBuffer.Truncate();
......@@ -120,7 +120,7 @@ nsEmbedClipboard::GetData(nsITransferable* aTransferable, int32_t aWhichClipboar
}
NS_IMETHODIMP
nsEmbedClipboard::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData)
nsEmbedClipboard::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData)
{
if (!strcmp(aTopic, "embedui:clipboard")) {
mObserverService->RemoveObserver(this, "embedui:clipboard");
......
......@@ -263,7 +263,7 @@ nsEmbedFilePicker::DoSendPrompt()
}
NS_IMETHODIMP
nsEmbedFilePicker::OnMessageReceived(const char* messageName, const PRUnichar* message)
nsEmbedFilePicker::OnMessageReceived(const char* messageName, const char16_t* message)
{
nsCOMPtr<nsIEmbedLiteJSON> json = do_GetService("@mozilla.org/embedlite-json;1");
nsCOMPtr<nsIPropertyBag2> root;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment