Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsAppStartup.cpp File Reference
#include "nsAppStartup.h"
#include "nsIAppShellService.h"
#include "nsICloseAllWindows.h"
#include "nsICmdLineService.h"
#include "nsIDOMWindowInternal.h"
#include "nsIEventQueue.h"
#include "nsIEventQueueService.h"
#include "nsIInterfaceRequestor.h"
#include "nsILocalFile.h"
#include "nsIObserverService.h"
#include "nsIPrefBranch.h"
#include "nsIPrefService.h"
#include "nsIProfileChangeStatus.h"
#include "nsIProfileInternal.h"
#include "nsIPromptService.h"
#include "nsIStringBundle.h"
#include "nsISupportsPrimitives.h"
#include "nsITimelineService.h"
#include "nsIWebBrowserChrome.h"
#include "nsIWindowMediator.h"
#include "nsIWindowWatcher.h"
#include "nsIXULWindow.h"
#include "nsNativeCharsetUtils.h"
#include "prprf.h"
#include "nsCRT.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsWidgetsCID.h"
#include "nsAppShellCID.h"
#include "nsXPFEComponentsCID.h"
#include "nsEmbedCID.h"

Go to the source code of this file.

Functions

 NS_DEFINE_CID (kAppShellCID, NS_APPSHELL_CID)
 NS_IMPL_ISUPPORTS5 (nsAppStartup, nsIAppStartup, nsIWindowCreator, nsIWindowCreator2, nsIObserver, nsISupportsWeakReference) NS_IMETHODIMP nsAppStartup

Function Documentation

NS_DEFINE_CID ( kAppShellCID  ,
NS_APPSHELL_CID   
)

Definition at line 92 of file nsAppStartup.cpp.

{
  nsresult rv;

  // Remember where the native app support lives.
  mNativeAppSupport = do_QueryInterface(aNativeAppSupportOrSplashScreen);

  // Or, remember the splash screen (for backward compatibility).
  if (!mNativeAppSupport)
    mSplashScreen = do_QueryInterface(aNativeAppSupportOrSplashScreen);

  // Create widget application shell
  mAppShell = do_CreateInstance(kAppShellCID, &rv);
  NS_ENSURE_SUCCESS(rv, rv);

  rv = mAppShell->Create(nsnull, nsnull);
  NS_ENSURE_SUCCESS(rv, rv);

  // listen to EventQueues' comings and goings. do this after the appshell
  // has been created, but after the event queue has been created. that
  // latter bit is unfortunate, but we deal with it.
  nsCOMPtr<nsIObserverService> os
    (do_GetService("@mozilla.org/observer-service;1", &rv));
  NS_ENSURE_SUCCESS(rv, rv);

  os->AddObserver(this, "nsIEventQueueActivated", PR_TRUE);
  os->AddObserver(this, "nsIEventQueueDestroyed", PR_TRUE);
  os->AddObserver(this, "skin-selected", PR_TRUE);
  os->AddObserver(this, "locale-selected", PR_TRUE);
  os->AddObserver(this, "xpinstall-restart", PR_TRUE);
  os->AddObserver(this, "profile-change-teardown", PR_TRUE);
  os->AddObserver(this, "profile-initial-state", PR_TRUE);
  os->AddObserver(this, "xul-window-registered", PR_TRUE);
  os->AddObserver(this, "xul-window-destroyed", PR_TRUE);
  os->AddObserver(this, "xul-window-visible", PR_TRUE);

  return NS_OK;
}

Here is the call graph for this function: