You no longer need to listen to any event queues. fixes build bustage.

This commit is contained in:
dougt%meer.net 2006-06-08 06:22:11 +00:00
Родитель 104da4edd0
Коммит 24369fc44a
1 изменённых файлов: 1 добавлений и 30 удалений

Просмотреть файл

@ -56,7 +56,6 @@ const static char* start_url = "chrome://minimo/content/minimo.xul";
//const static char* start_url = "resource://gre/res/start.html";
//const static char* start_url = "resource://gre/res/1.html";
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
void OpenNewTab(char* url)
@ -121,10 +120,6 @@ ApplicationObserver::ApplicationObserver(nsIAppShell* aAppShell)
nsCOMPtr<nsIObserverService> os = do_GetService("@mozilla.org/observer-service;1");
os->AddObserver(this, "nsIEventQueueActivated", PR_FALSE);
os->AddObserver(this, "nsIEventQueueDestroyed", PR_FALSE);
os->AddObserver(this, "xul-window-registered", PR_FALSE);
os->AddObserver(this, "xul-window-destroyed", PR_FALSE);
os->AddObserver(this, "xul-window-visible", PR_FALSE);
@ -141,31 +136,7 @@ NS_IMPL_ISUPPORTS1(ApplicationObserver, nsIObserver)
NS_IMETHODIMP
ApplicationObserver::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData)
{
if (!strcmp(aTopic, "nsIEventQueueActivated"))
{
nsCOMPtr<nsIEventQueue> eq(do_QueryInterface(aSubject));
if (eq)
{
PRBool isNative = PR_TRUE;
// we only add native event queues to the appshell
eq->IsQueueNative(&isNative);
if (isNative)
mAppShell->ListenToEventQueue(eq, PR_TRUE);
}
}
else if (!strcmp(aTopic, "nsIEventQueueDestroyed"))
{
nsCOMPtr<nsIEventQueue> eq(do_QueryInterface(aSubject));
if (eq)
{
PRBool isNative = PR_TRUE;
// we only remove native event queues from the appshell
eq->IsQueueNative(&isNative);
if (isNative)
mAppShell->ListenToEventQueue(eq, PR_FALSE);
}
}
else if (!strcmp(aTopic, "xul-window-visible"))
if (!strcmp(aTopic, "xul-window-visible"))
{
KillSplashScreen();
}