Fixing more fallout from danm's checkin.
git-svn-id: svn://10.0.0.236/trunk@91763 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsINetSupportDialogService.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsProxiedService.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
@@ -38,7 +37,6 @@
|
||||
#include "cert.h"
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
|
||||
static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
|
||||
|
||||
char* PK11PasswordPrompt(PK11SlotInfo* slot, PRBool retry, void* arg) {
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
#include "nsNSSHelper.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#include "nsINetSupportDialogService.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsProxiedService.h"
|
||||
|
||||
#include "nss.h"
|
||||
@@ -566,8 +567,6 @@ nsNSSComponent::RegisterProfileChangeObserver()
|
||||
return rv;
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(PipUIContext, nsIInterfaceRequestor)
|
||||
|
||||
PipUIContext::PipUIContext()
|
||||
@@ -585,12 +584,22 @@ NS_IMETHODIMP PipUIContext::GetInterface(const nsIID & uuid, void * *result)
|
||||
nsresult rv;
|
||||
|
||||
if (uuid.Equals(NS_GET_IID(nsIPrompt))) {
|
||||
NS_WITH_PROXIED_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID,
|
||||
NS_UI_THREAD_EVENTQ, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsCOMPtr<nsIProxyObjectManager> proxyman(do_GetService(NS_XPCOMPROXY_CONTRACTID));
|
||||
if (!proxyman) return NS_ERROR_FAILURE;
|
||||
|
||||
*result = dialog;
|
||||
NS_ADDREF(dialog);
|
||||
nsCOMPtr<nsIPrompt> prompter;
|
||||
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
|
||||
if (wwatch) {
|
||||
wwatch->GetNewPrompter(0, getter_AddRefs(prompter));
|
||||
if (prompter) {
|
||||
nsCOMPtr<nsIPrompt> proxyPrompt;
|
||||
proxyman->GetProxyForObject(NS_UI_THREAD_EVENTQ, NS_GET_IID(nsIPrompt),
|
||||
prompter, PROXY_SYNC, getter_AddRefs(proxyPrompt));
|
||||
if (!proxyPrompt) return NS_ERROR_FAILURE;
|
||||
*result = proxyPrompt;
|
||||
NS_ADDREF(proxyPrompt);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rv = NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
@@ -687,12 +696,22 @@ NS_IMETHODIMP CertDownloaderContext::GetInterface(const nsIID & uuid, void * *re
|
||||
nsresult rv;
|
||||
|
||||
if (uuid.Equals(NS_GET_IID(nsIPrompt))) {
|
||||
NS_WITH_PROXIED_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID,
|
||||
NS_UI_THREAD_EVENTQ, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsCOMPtr<nsIProxyObjectManager> proxyman(do_GetService(NS_XPCOMPROXY_CONTRACTID));
|
||||
if (!proxyman) return NS_ERROR_FAILURE;
|
||||
|
||||
*result = dialog;
|
||||
NS_ADDREF(dialog);
|
||||
nsCOMPtr<nsIPrompt> prompter;
|
||||
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
|
||||
if (wwatch) {
|
||||
wwatch->GetNewPrompter(0, getter_AddRefs(prompter));
|
||||
if (prompter) {
|
||||
nsCOMPtr<nsIPrompt> proxyPrompt;
|
||||
proxyman->GetProxyForObject(NS_UI_THREAD_EVENTQ, NS_GET_IID(nsIPrompt),
|
||||
prompter, PROXY_SYNC, getter_AddRefs(proxyPrompt));
|
||||
if (!proxyPrompt) return NS_ERROR_FAILURE;
|
||||
*result = proxyPrompt;
|
||||
NS_ADDREF(proxyPrompt);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rv = NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISecurityManagerComponent.h"
|
||||
#include "nsINetSupportDialogService.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsProxiedService.h"
|
||||
#include "nsINSSDialogs.h"
|
||||
|
||||
@@ -43,8 +44,6 @@
|
||||
#include "pk11func.h"
|
||||
#include "pk11sdr.h" // For PK11SDR_Encrypt, PK11SDR_Decrypt
|
||||
|
||||
static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
|
||||
|
||||
//
|
||||
// Implementation of an nsIInterfaceRequestor for use
|
||||
// as context for NSS calls
|
||||
@@ -77,12 +76,22 @@ NS_IMETHODIMP nsSDRContext::GetInterface(const nsIID & uuid, void * *result)
|
||||
nsresult rv;
|
||||
|
||||
if (uuid.Equals(NS_GET_IID(nsIPrompt))) {
|
||||
NS_WITH_PROXIED_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID,
|
||||
NS_UI_THREAD_EVENTQ, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsCOMPtr<nsIProxyObjectManager> proxyman(do_GetService(NS_XPCOMPROXY_CONTRACTID));
|
||||
if (!proxyman) return NS_ERROR_FAILURE;
|
||||
|
||||
*result = dialog;
|
||||
NS_ADDREF(dialog);
|
||||
nsCOMPtr<nsIPrompt> prompter;
|
||||
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
|
||||
if (wwatch) {
|
||||
wwatch->GetNewPrompter(0, getter_AddRefs(prompter));
|
||||
if (prompter) {
|
||||
nsCOMPtr<nsIPrompt> proxyPrompt;
|
||||
proxyman->GetProxyForObject(NS_UI_THREAD_EVENTQ, NS_GET_IID(nsIPrompt),
|
||||
prompter, PROXY_SYNC, getter_AddRefs(proxyPrompt));
|
||||
if (!proxyPrompt) return NS_ERROR_FAILURE;
|
||||
*result = proxyPrompt;
|
||||
NS_ADDREF(proxyPrompt);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rv = NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user