зеркало из https://github.com/mozilla/gecko-dev.git
Add enumerateAndInitialize to public interface. Move enumeration out of Init
This commit is contained in:
Родитель
0cfe955305
Коммит
98cecafa89
|
@ -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.
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче