Changes to enable an asynchronous webshell instantiation in response to a

window.open call.
This commit is contained in:
hyatt%netscape.com 1999-04-19 21:09:07 +00:00
parent bdd9fd47e1
commit 7b6b2b5684
2 changed files with 28 additions and 8 deletions

View File

@ -733,6 +733,25 @@ void nsWebShellWindow::LoadMenus(nsIDOMDocument * aDOMDoc, nsIWidget * aParentWi
NS_IMETHODIMP
nsWebShellWindow::NewWebShell(PRUint32 aChromeMask, PRBool aVisible,
nsIWebShell *&aNewWebShell)
{
// Don't return a web shell, since the shell that will hold our content
// hasn't been instantiated yet. We'll have to wait and set up the linkage
// at a later date.
aNewWebShell = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsWebShellWindow::CanCreateNewWebShell(PRBool& aResult)
{
aResult = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsWebShellWindow::SetNewWebShellInfo(const nsString& aName, const nsString& anURL,
nsIWebShell* aOpenerShell, PRUint32 chrome,
nsIWebShell** aNewWebShellResult)
{
// Create a new browser window. That's what this method is here for.
nsresult rv;
@ -757,14 +776,10 @@ nsWebShellWindow::NewWebShell(PRUint32 aChromeMask, PRBool aVisible,
nsnull, nsnull, 615, 480);
nsServiceManager::ReleaseService(kAppShellServiceCID, appShell);
if (aVisible)
newWindow->Show(PR_TRUE);
// XXX Return our outermost webshell. We know this is wrong, since it means new windows
// won't have chrome, but it's going to take a little while for me to figure this out.
NS_IF_ADDREF(mWebShell);
aNewWebShell = mWebShell;
return rv;
// Now return our web shell.
NS_IF_ADDREF(mWebShell);
*aNewWebShellResult = mWebShell;
return NS_OK;
}
NS_IMETHODIMP nsWebShellWindow::FindWebShellWithName(const PRUnichar* aName,

View File

@ -87,6 +87,11 @@ public:
PRBool aVisible,
nsIWebShell *&aNewWebShell);
NS_IMETHOD CanCreateNewWebShell(PRBool& aResult);
NS_IMETHOD SetNewWebShellInfo(const nsString& aName, const nsString& anURL,
nsIWebShell* aOpenerShell, PRUint32 aChromeMask,
nsIWebShell** aNewShell);
NS_IMETHOD FindWebShellWithName(const PRUnichar* aName,
nsIWebShell*& aResult);