From f9eaeada7ac71e9f02fda4c16a269adecb301121 Mon Sep 17 00:00:00 2001 From: "davidm%netscape.com" Date: Tue, 31 Aug 1999 02:47:56 +0000 Subject: [PATCH] Add enumerateAndInitialize to public interface. Move enumeration out of Init git-svn-id: svn://10.0.0.236/trunk@45266 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/appshell/public/nsIAppShellService.idl | 3 +++ mozilla/xpfe/appshell/src/nsAppShellService.cpp | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/xpfe/appshell/public/nsIAppShellService.idl b/mozilla/xpfe/appshell/public/nsIAppShellService.idl index 13a07bc09bf..7ffafd2b73c 100644 --- a/mozilla/xpfe/appshell/public/nsIAppShellService.idl +++ b/mozilla/xpfe/appshell/public/nsIAppShellService.idl @@ -132,6 +132,9 @@ interface nsIAppShellService : nsISupports in PRUint32 aChromeMask, in nsIXULWindowCallbacks aCallbacks, in long aInitialWidth, in long aInitialHeight); + + // Apply Initialize function to each app shell component. + void EnumerateAndInitializeComponents(); /** * Close a window. diff --git a/mozilla/xpfe/appshell/src/nsAppShellService.cpp b/mozilla/xpfe/appshell/src/nsAppShellService.cpp index c14e2e9544a..b7d15ed2a68 100644 --- a/mozilla/xpfe/appshell/src/nsAppShellService.cpp +++ b/mozilla/xpfe/appshell/src/nsAppShellService.cpp @@ -243,8 +243,7 @@ nsAppShellService::Initialize( nsICmdLineService *aCmdLineService ) goto done; } - // Initialize each registered component. - EnumerateComponents( &nsAppShellService::InitializeComponent ); + // enable window mediation rv = nsServiceManager::GetService(kWindowMediatorCID, kIWindowMediatorIID, @@ -280,6 +279,12 @@ void nsAppShellService::CreateHiddenWindow() NS_ASSERTION(NS_SUCCEEDED(rv), "HiddenWindow not created"); } + NS_IMETHODIMP nsAppShellService::EnumerateAndInitializeComponents(void) + { + // Initialize each registered component. + EnumerateComponents( &nsAppShellService::InitializeComponent ); + return NS_OK; + } // Apply function (Initialize/Shutdown) to each app shell component. void nsAppShellService::EnumerateComponents( EnumeratorMemberFunction function ) {