Changed nsIAppShellService and nsIWindowMediator to talk in terms of nsIXULWindow instead of nsIWebShellWindow. Also removed the function nsIAppShellService::RunModalDialog since windows should be created using the nsIDOMWindow::OpenDialog. r=danm a=jevering

git-svn-id: svn://10.0.0.236/trunk@61816 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-02-29 00:20:55 +00:00
parent b0b2bbb4c8
commit 13b61ed851
21 changed files with 242 additions and 356 deletions

View File

@@ -20,32 +20,36 @@
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
// Local Includes
#include "nsNetSupportDialog.h"
// Helper Classes
#include "nsAppShellCIDs.h"
#include "nsCOMPtr.h"
//Interfaces Needed
#include "nsIAppShellService.h"
#include "nsIServiceManager.h"
#include "nsAppShellCIDs.h"
#include "nsIWebShellWindow.h"
#include "nsICommonDialogs.h"
#include "nsIDOMWindow.h"
#include "nsIServiceManager.h"
#include "nsIXULWindow.h"
/* Define Class IDs */
static NS_DEFINE_CID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
PRBool GetNSIPrompt( nsCOMPtr<nsIPrompt> & outPrompt )
{
nsresult rv;
NS_WITH_SERVICE(nsIAppShellService, appshellservice, kAppShellServiceCID, &rv);
if(NS_FAILED(rv)) {
return PR_FALSE;
}
nsCOMPtr<nsIWebShellWindow> webshellwindow;
appshellservice->GetHiddenWindow(getter_AddRefs(webshellwindow));
outPrompt = do_QueryInterface(webshellwindow);
if ( outPrompt.get() != NULL )
return PR_TRUE;
return PR_FALSE;
nsCOMPtr<nsIAppShellService> appShellService(do_GetService(kAppShellServiceCID));
if(!appShellService)
return PR_FALSE;
nsCOMPtr<nsIXULWindow> xulWindow;
appShellService->GetHiddenWindow(getter_AddRefs(xulWindow));
outPrompt = do_QueryInterface(xulWindow);
if(outPrompt)
return PR_TRUE;
return PR_FALSE;
}
nsNetSupportDialog::nsNetSupportDialog()