From 264d8928b8c032e892f617a49f5f330c82a81ad2 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Tue, 8 Dec 1998 02:39:48 +0000 Subject: [PATCH] Implement new NewWebShell API git-svn-id: svn://10.0.0.236/trunk@15957 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 14 +++++++++----- mozilla/webshell/src/nsWebShell.cpp | 14 +++++++++----- mozilla/webshell/tests/viewer/nsBrowserWindow.h | 4 +++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 548dd3bf5c5..4b607b307a3 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -207,7 +207,9 @@ public: NS_IMETHOD BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL); NS_IMETHOD ProgressLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aProgress, PRInt32 aProgressMax); NS_IMETHOD EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aStatus); - NS_IMETHOD NewWebShell(nsIWebShell *&aNewWebShell); + NS_IMETHOD NewWebShell(PRUint32 aChromeMask, + PRBool aVisible, + nsIWebShell *&aNewWebShell); NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult); NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell); @@ -1467,10 +1469,12 @@ nsWebShell::EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aStat } NS_IMETHODIMP -nsWebShell::NewWebShell(nsIWebShell *&aNewWebShell) +nsWebShell::NewWebShell(PRUint32 aChromeMask, + PRBool aVisible, + nsIWebShell *&aNewWebShell) { if (nsnull != mContainer) { - return mContainer->NewWebShell(aNewWebShell); + return mContainer->NewWebShell(aChromeMask, aVisible, aNewWebShell); } return NS_OK; } @@ -1607,7 +1611,7 @@ nsWebShell::GetTarget(const PRUnichar* aName) if (name.EqualsIgnoreCase("_blank")) { nsIWebShell *shell; - if (NS_OK == NewWebShell(shell)) + if (NS_OK == NewWebShell(PRUint32(~0), PR_TRUE, shell)) target = shell; else { @@ -1636,7 +1640,7 @@ nsWebShell::GetTarget(const PRUnichar* aName) if (nsnull != mContainer) { mContainer->FindWebShellWithName(aName, target); if (nsnull == target) { - mContainer->NewWebShell(target); + mContainer->NewWebShell(PRUint32(~0), PR_TRUE, target); } if (nsnull != target) { target->SetName(aName); diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 548dd3bf5c5..4b607b307a3 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -207,7 +207,9 @@ public: NS_IMETHOD BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL); NS_IMETHOD ProgressLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aProgress, PRInt32 aProgressMax); NS_IMETHOD EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aStatus); - NS_IMETHOD NewWebShell(nsIWebShell *&aNewWebShell); + NS_IMETHOD NewWebShell(PRUint32 aChromeMask, + PRBool aVisible, + nsIWebShell *&aNewWebShell); NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult); NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell); @@ -1467,10 +1469,12 @@ nsWebShell::EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aStat } NS_IMETHODIMP -nsWebShell::NewWebShell(nsIWebShell *&aNewWebShell) +nsWebShell::NewWebShell(PRUint32 aChromeMask, + PRBool aVisible, + nsIWebShell *&aNewWebShell) { if (nsnull != mContainer) { - return mContainer->NewWebShell(aNewWebShell); + return mContainer->NewWebShell(aChromeMask, aVisible, aNewWebShell); } return NS_OK; } @@ -1607,7 +1611,7 @@ nsWebShell::GetTarget(const PRUnichar* aName) if (name.EqualsIgnoreCase("_blank")) { nsIWebShell *shell; - if (NS_OK == NewWebShell(shell)) + if (NS_OK == NewWebShell(PRUint32(~0), PR_TRUE, shell)) target = shell; else { @@ -1636,7 +1640,7 @@ nsWebShell::GetTarget(const PRUnichar* aName) if (nsnull != mContainer) { mContainer->FindWebShellWithName(aName, target); if (nsnull == target) { - mContainer->NewWebShell(target); + mContainer->NewWebShell(PRUint32(~0), PR_TRUE, target); } if (nsnull != target) { target->SetName(aName); diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.h b/mozilla/webshell/tests/viewer/nsBrowserWindow.h index 244e9a497e4..2576e5b5c33 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.h +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.h @@ -96,7 +96,9 @@ public: NS_IMETHOD BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL); NS_IMETHOD ProgressLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aProgress, PRInt32 aProgressMax); NS_IMETHOD EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aStatus); - NS_IMETHOD NewWebShell(nsIWebShell *&aNewWebShell); + NS_IMETHOD NewWebShell(PRUint32 aChromeMask, + PRBool aVisible, + nsIWebShell *&aNewWebShell); NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult); NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell);