diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index d532a2cb0b1..a4438163863 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -362,23 +362,7 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent, NS_METHOD nsWebShellWindow::Close() { -#ifdef USE_NATIVE_MENUS - // unregister as document listener - // this is needed for menus - nsCOMPtr cv; - if(mDocShell) - mDocShell->GetContentViewer(getter_AddRefs(cv)); - nsCOMPtr docv(do_QueryInterface(cv)); - if(docv) - { - nsCOMPtr doc; - docv->GetDocument(*getter_AddRefs(doc)); - if(doc) - doc->RemoveObserver(NS_STATIC_CAST(nsIDocumentObserver*, this)); - } -#endif - - return nsXULWindow::Destroy(); + return Destroy(); } @@ -578,40 +562,6 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent) return result; } - -NS_IMETHODIMP -nsWebShellWindow::WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, - nsLoadType aReason) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsWebShellWindow::BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL) -{ - // If loading a new root .xul document, then redo chrome. - if (aShell == mWebShell) { - mChromeLoaded = PR_FALSE; - } - return NS_OK; -} - -NS_IMETHODIMP -nsWebShellWindow::ProgressLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, - PRInt32 aProgress, PRInt32 aProgressMax) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsWebShellWindow::EndLoadURL(nsIWebShell* aWebShell, const PRUnichar* aURL, - nsresult aStatus) -{ - return NS_OK; -} - - - //---------------------------------------- NS_IMETHODIMP nsWebShellWindow::CreateMenu(nsIMenuBar * aMenuBar, nsIDOMNode * aMenuNode, @@ -1755,6 +1705,28 @@ nsWebShellWindow::NotifyObservers( const nsString &aTopic, const nsString &someD } return rv; } + +// nsIBaseWindow +NS_IMETHODIMP nsWebShellWindow::Destroy() +{ +#ifdef USE_NATIVE_MENUS + // unregister as document listener + // this is needed for menus + nsCOMPtr cv; + if(mDocShell) + mDocShell->GetContentViewer(getter_AddRefs(cv)); + nsCOMPtr docv(do_QueryInterface(cv)); + if(docv) + { + nsCOMPtr doc; + docv->GetDocument(*getter_AddRefs(doc)); + if(doc) + doc->RemoveObserver(NS_STATIC_CAST(nsIDocumentObserver*, this)); + } +#endif + + return nsXULWindow::Destroy(); +} // nsIPrompt NS_IMETHODIMP nsWebShellWindow::Alert(const PRUnichar *text) diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.h b/mozilla/xpfe/appshell/src/nsWebShellWindow.h index bdc79a0604c..059b29ffe1a 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.h +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.h @@ -73,24 +73,6 @@ public: // nsISupports interface... NS_DECL_ISUPPORTS - - // nsIWebShellContainer interface... - NS_IMETHOD WillLoadURL(nsIWebShell* aShell, - const PRUnichar* aURL, - nsLoadType aReason); - - 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, - nsresult aStatus); - NS_IMETHOD GetContentShellById(const nsString& anID, nsIWebShell** aResult); NS_IMETHOD LockUntilChromeLoad() { mLockedUntilChromeLoad = PR_TRUE; return NS_OK; } NS_IMETHOD GetLockedState(PRBool& aResult) { aResult = mLockedUntilChromeLoad; return NS_OK; } @@ -182,6 +164,8 @@ public: NS_IMETHOD DocumentWillBeDestroyed(nsIDocument *aDocument); // nsINetSupport + // nsIBaseWindow + NS_IMETHOD Destroy(); // nsIPrompt NS_DECL_NSIPROMPT