From 7475e9b9b53bb207a0292b1836837ba5e45ce964 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Tue, 29 Feb 2000 22:03:49 +0000 Subject: [PATCH] Removing nsIXULWindowCallbacks as they were removed from active use nearly 8 or more months ago. Getting rid of having to pass it around as a parameter and all that fun stuff. r=danm a=jevering git-svn-id: svn://10.0.0.236/trunk@61907 18797224-902f-48f8-a5cc-f745e15eee43 --- .../pref-migrator/src/nsPrefMigration.cpp | 2 +- mozilla/profile/src/nsProfile.cpp | 2 -- .../xpfe/appshell/public/nsIAppShellService.idl | 2 -- mozilla/xpfe/appshell/src/nsAppShellService.cpp | 11 ++++------- mozilla/xpfe/appshell/src/nsAppShellService.h | 1 - mozilla/xpfe/appshell/src/nsWebShellWindow.cpp | 17 +---------------- mozilla/xpfe/appshell/src/nsWebShellWindow.h | 3 --- mozilla/xpfe/appshell/src/nsXULWindow.cpp | 4 ++-- mozilla/xpfe/bootstrap/nsAppRunner.cpp | 2 +- mozilla/xpfe/browser/src/nsBrowserInstance.cpp | 1 - .../sample/src/nsSampleAppShellComponent.cpp | 1 - mozilla/xpfe/components/timebomb/nsTimeBomb.cpp | 1 - 12 files changed, 9 insertions(+), 38 deletions(-) diff --git a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp index 9e6455dbf2b..dc32f9a768e 100644 --- a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp @@ -328,7 +328,7 @@ nsPrefMigration::ProcessPrefs(PRBool showProgressAsModalWindow) rv = PMProgressAppShell->CreateTopLevelWindow(nsnull, pmprogressURL, PR_TRUE, PR_TRUE, NS_CHROME_ALL_CHROME, - nsnull, NS_SIZETOCONTENT, NS_SIZETOCONTENT, + NS_SIZETOCONTENT, NS_SIZETOCONTENT, getter_AddRefs(mPMProgressWindow)); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp index 99efe302d69..3b408eee9f2 100644 --- a/mozilla/profile/src/nsProfile.cpp +++ b/mozilla/profile/src/nsProfile.cpp @@ -326,7 +326,6 @@ nsProfile::LoadDefaultProfileDir(nsCString & profileURLStr) nsCOMPtr profWindow; rv = profAppShell->CreateTopLevelWindow(nsnull, profileURL, PR_TRUE, PR_TRUE, CHROME_STYLE, - nsnull, NS_SIZETOCONTENT, // width NS_SIZETOCONTENT, // height getter_AddRefs(profWindow)); @@ -1741,7 +1740,6 @@ nsProfile::TriggerActivation(const char *profileName) rv = pregAppShell->CreateTopLevelWindow(nsnull, registrationURL, PR_TRUE, PR_TRUE, NS_CHROME_ALL_CHROME, - nsnull, NS_SIZETOCONTENT, // width NS_SIZETOCONTENT, // height getter_AddRefs(mPregWindow)); diff --git a/mozilla/xpfe/appshell/public/nsIAppShellService.idl b/mozilla/xpfe/appshell/public/nsIAppShellService.idl index 9da41a4660e..c97351dc992 100644 --- a/mozilla/xpfe/appshell/public/nsIAppShellService.idl +++ b/mozilla/xpfe/appshell/public/nsIAppShellService.idl @@ -31,7 +31,6 @@ interface nsIXULWindow; interface nsIURI; -interface nsIXULWindowCallbacks; interface nsICmdLineService; interface nsISplashScreen; @@ -102,7 +101,6 @@ interface nsIAppShellService : nsISupports in boolean aShowWindow, in boolean aLoadDefaultPage, in PRUint32 aChromeMask, - in nsIXULWindowCallbacks aCallbacks, in long aInitialWidth, in long aInitialHeight, out nsIXULWindow aResult); diff --git a/mozilla/xpfe/appshell/src/nsAppShellService.cpp b/mozilla/xpfe/appshell/src/nsAppShellService.cpp index bb11c329e29..d3e4de793a1 100644 --- a/mozilla/xpfe/appshell/src/nsAppShellService.cpp +++ b/mozilla/xpfe/appshell/src/nsAppShellService.cpp @@ -212,14 +212,14 @@ nsAppShellService::CreateHiddenWindow() if (NS_SUCCEEDED(rv)) { nsCOMPtr newWindow; rv = JustCreateTopWindow(nsnull, url, PR_FALSE, PR_FALSE, - 0, nsnull, 0, 0, + 0, 0, 0, getter_AddRefs(newWindow)); #else rv = NS_NewURI(&url, "about:blank"); if (NS_SUCCEEDED(rv)) { nsCOMPtr newWindow; rv = JustCreateTopWindow(nsnull, url, PR_FALSE, PR_FALSE, - NS_CHROME_ALL_CHROME, nsnull, 100, 100, + NS_CHROME_ALL_CHROME, 100, 100, getter_AddRefs(newWindow)); #endif if (NS_SUCCEEDED(rv)) { @@ -517,7 +517,6 @@ nsAppShellService::CreateTopLevelWindow(nsIXULWindow *aParent, nsIURI *aUrl, PRBool aShowWindow, PRBool aLoadDefaultPage, PRUint32 aChromeMask, - nsIXULWindowCallbacks *aCallbacks, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIXULWindow **aResult) @@ -525,8 +524,7 @@ nsAppShellService::CreateTopLevelWindow(nsIXULWindow *aParent, nsresult rv; rv = JustCreateTopWindow(aParent, aUrl, aShowWindow, aLoadDefaultPage, - aChromeMask, aCallbacks, - aInitialWidth, aInitialHeight, + aChromeMask, aInitialWidth, aInitialHeight, aResult); if (NS_SUCCEEDED(rv)) @@ -545,7 +543,6 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent, nsIURI *aUrl, PRBool aShowWindow, PRBool aLoadDefaultPage, PRUint32 aChromeMask, - nsIXULWindowCallbacks *aCallbacks, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIXULWindow **aResult) { @@ -593,7 +590,7 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent, } rv = window->Initialize(aParent, mAppShell, aUrl, - aShowWindow, aLoadDefaultPage, aCallbacks, + aShowWindow, aLoadDefaultPage, aInitialWidth, aInitialHeight, widgetInitData); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/xpfe/appshell/src/nsAppShellService.h b/mozilla/xpfe/appshell/src/nsAppShellService.h index 37a50698a11..503ce22e936 100644 --- a/mozilla/xpfe/appshell/src/nsAppShellService.h +++ b/mozilla/xpfe/appshell/src/nsAppShellService.h @@ -52,7 +52,6 @@ protected: nsIURI *aUrl, PRBool aShowWindow, PRBool aLoadDefaultPage, PRUint32 aChromeMask, - nsIXULWindowCallbacks *aCallbacks, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIXULWindow **aResult); void InitializeComponent( const nsCID &aComponentCID ); diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index 881ac544529..ee68bed0da1 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -53,7 +53,6 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsWidgetsCID.h" #include "nsIWidget.h" #include "nsIAppShell.h" -#include "nsIXULWindowCallbacks.h" #include "nsIAppShellService.h" #include "nsAppShellCIDs.h" @@ -221,7 +220,6 @@ nsWebShellWindow::nsWebShellWindow() : nsXULWindow() mWebShell = nsnull; mWindow = nsnull; - mCallbacks = nsnull; mLockedUntilChromeLoad = PR_FALSE; mIntrinsicallySized = PR_FALSE; mDebuting = PR_FALSE; @@ -245,8 +243,6 @@ nsWebShellWindow::~nsWebShellWindow() mSPTimer->Cancel(); PR_Unlock(mSPTimerLock); PR_DestroyLock(mSPTimerLock); - - NS_IF_RELEASE(mCallbacks); } NS_IMPL_ADDREF(nsWebShellWindow); @@ -270,7 +266,6 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent, nsIAppShell* aShell, nsIURI* aUrl, PRBool aCreatedVisible, PRBool aLoadDefaultPage, - nsIXULWindowCallbacks *aCallbacks, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsWidgetInitData& widgetInitData) { @@ -361,10 +356,6 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent, nsServiceManager::ReleaseService(kPrefCID, prefs); } - NS_IF_RELEASE(mCallbacks); - mCallbacks = aCallbacks; - NS_IF_ADDREF(mCallbacks); - if (nsnull != aUrl) { char *tmpStr = NULL; nsAutoString urlString; @@ -1456,14 +1447,8 @@ void nsWebShellWindow::ExecuteStartupCode() if (webshellNode) webshellElement = do_QueryInterface(webshellNode); - if (mCallbacks) - mCallbacks->ConstructBeforeJavaScript(mWebShell); - // Execute the string in the onLoad attribute of the webshellElement. nsString startupCode; - - if (mCallbacks) - mCallbacks->ConstructAfterJavaScript(mWebShell); } /* copy the window's size and position to the window tag */ @@ -1797,7 +1782,7 @@ NS_IMETHODIMP nsWebShellWindow::Init(nsIAppShell* aAppShell, widgetInitData.mBorderStyle = eBorderStyle_default; rv = Initialize(nsnull, aAppShell, urlObj, PR_TRUE, PR_TRUE, - nsnull, aBounds.width, aBounds.height, widgetInitData); + aBounds.width, aBounds.height, widgetInitData); EnsureContentTreeOwner(); mContentTreeOwner->SetChromeMask(aChromeMask); if (NS_SUCCEEDED(rv)) diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.h b/mozilla/xpfe/appshell/src/nsWebShellWindow.h index 1023f9c8ec7..0168b9d2c6f 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.h +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.h @@ -57,7 +57,6 @@ class nsIDOMHTMLImageElement; class nsIDOMHTMLInputElement; class nsIStreamObserver; class nsIWidget; -class nsIXULWindowCallbacks; class nsVoidArray; class nsWebShellWindow : public nsXULWindow, @@ -114,7 +113,6 @@ public: // nsWebShellWindow methods... nsresult Initialize(nsIXULWindow * aParent, nsIAppShell* aShell, nsIURI* aUrl, PRBool aCreatedVisible, PRBool aLoadDefaultPage, - nsIXULWindowCallbacks *aCallbacks, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsWidgetInitData& widgetInitData); nsIWidget* GetWidget(void) { return mWindow; } @@ -248,7 +246,6 @@ protected: nsresult NotifyObservers( const nsString &aTopic, const nsString &someData ); nsIWebShell* mWebShell; - nsIXULWindowCallbacks* mCallbacks; PRBool mLockedUntilChromeLoad; PRBool mLoadDefaultPage; diff --git a/mozilla/xpfe/appshell/src/nsXULWindow.cpp b/mozilla/xpfe/appshell/src/nsXULWindow.cpp index ca4b49587a6..9a49d8eac30 100644 --- a/mozilla/xpfe/appshell/src/nsXULWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsXULWindow.cpp @@ -951,7 +951,7 @@ NS_IMETHODIMP nsXULWindow::CreateNewChromeWindow(PRInt32 aChromeFlags, nsCOMPtr newWindow; appShell->CreateTopLevelWindow(parent, nsnull, PR_FALSE, PR_FALSE, - aChromeFlags, nsnull, NS_SIZETOCONTENT, NS_SIZETOCONTENT, + aChromeFlags, NS_SIZETOCONTENT, NS_SIZETOCONTENT, getter_AddRefs(newWindow)); NS_ENSURE_TRUE(newWindow, NS_ERROR_FAILURE); @@ -995,7 +995,7 @@ NS_IMETHODIMP nsXULWindow::CreateNewContentWindow(PRInt32 aChromeFlags, nsCOMPtr newWindow; appShell->CreateTopLevelWindow(nsnull, uri, PR_FALSE, PR_FALSE, - aChromeFlags, nsnull, 615, 480, + aChromeFlags, 615, 480, getter_AddRefs(newWindow)); NS_ENSURE_TRUE(newWindow, NS_ERROR_FAILURE); diff --git a/mozilla/xpfe/bootstrap/nsAppRunner.cpp b/mozilla/xpfe/bootstrap/nsAppRunner.cpp index c6c4d9cccfc..7e81d80034e 100644 --- a/mozilla/xpfe/bootstrap/nsAppRunner.cpp +++ b/mozilla/xpfe/bootstrap/nsAppRunner.cpp @@ -226,7 +226,7 @@ static nsresult OpenChromURL( const char * urlstr, PRInt32 height = NS_SIZETOCON nsCOMPtr newWindow; rv = appShell->CreateTopLevelWindow(nsnull, url, PR_TRUE, PR_TRUE, NS_CHROME_ALL_CHROME, - nsnull, width, height, + width, height, getter_AddRefs(newWindow)); return rv; } diff --git a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp index 2a37780b085..b14ff1bb3e3 100644 --- a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp +++ b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp @@ -105,7 +105,6 @@ static NS_DEFINE_IID(kWalletServiceCID, NS_WALLETSERVICE_CID); #include "nsIUnkContentTypeHandler.h" // Stuff to implement file download dialog. -#include "nsIXULWindowCallbacks.h" #include "nsIDocumentObserver.h" #include "nsIContent.h" #include "nsIContentViewerFile.h" diff --git a/mozilla/xpfe/components/sample/src/nsSampleAppShellComponent.cpp b/mozilla/xpfe/components/sample/src/nsSampleAppShellComponent.cpp index c0152226b98..701003d6e1e 100644 --- a/mozilla/xpfe/components/sample/src/nsSampleAppShellComponent.cpp +++ b/mozilla/xpfe/components/sample/src/nsSampleAppShellComponent.cpp @@ -37,7 +37,6 @@ #include "nsIAppShellService.h" #include "prprf.h" -#include "nsIXULWindowCallbacks.h" #include "nsIDocumentObserver.h" #include "nsString.h" #include "nsIURL.h" diff --git a/mozilla/xpfe/components/timebomb/nsTimeBomb.cpp b/mozilla/xpfe/components/timebomb/nsTimeBomb.cpp index 84f76c0f84d..fcce592d972 100644 --- a/mozilla/xpfe/components/timebomb/nsTimeBomb.cpp +++ b/mozilla/xpfe/components/timebomb/nsTimeBomb.cpp @@ -60,7 +60,6 @@ static nsresult DisplayURI(const char *urlStr, PRBool block) PR_TRUE, PR_TRUE, NS_CHROME_ALL_CHROME, - nsnull, NS_SIZETOCONTENT, // width NS_SIZETOCONTENT, // height getter_AddRefs(window));