[kazehakase-svn] [3457] * module/embed/gecko/gtkmozembed/EmbedPrivate.cpp: Invoke

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
Sat Mar 8 20:17:44 JST 2008


Revision: 3457
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3457
Author:   ikezoe
Date:     2008-03-08 20:17:44 +0900 (Sat, 08 Mar 2008)

Log Message:
-----------
	* module/embed/gecko/gtkmozembed/EmbedPrivate.cpp: Invoke
	nsAppShell::Spinup() if the engine is not xulrunner.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2008-03-08 11:09:50 UTC (rev 3456)
+++ kazehakase/trunk/ChangeLog	2008-03-08 11:17:44 UTC (rev 3457)
@@ -5,6 +5,8 @@
 	* module/embed/gecko/gtkmozembed/EmbedPrivate.h: include
 	<nsIDOMEventReceiver.h> if it exists.
 	* macro/gecko.m4: Check exsitence of nsIAppShell::Spinup() method.
+	* module/embed/gecko/gtkmozembed/EmbedPrivate.cpp: Invoke
+	nsAppShell::Spinup() if the engine is not xulrunner.
 
 2008-03-07  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 

Modified: kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp
===================================================================
--- kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp	2008-03-08 11:09:50 UTC (rev 3456)
+++ kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp	2008-03-08 11:17:44 UTC (rev 3457)
@@ -82,6 +82,9 @@
 
 static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
 
+#ifdef MOZ_NSIAPPSHELL_HAVE_SPINUP_
+nsIAppShell *EmbedPrivate::sAppShell    = nsnull;
+#endif
 PRUint32     EmbedPrivate::sWidgetCount = 0;
 char        *EmbedPrivate::sCompPath    = nsnull;
 GList       *EmbedPrivate::sWindowList  = NULL;
@@ -452,6 +455,22 @@
     sMozillaEmbedPrivate = new MozillaEmbedPrivate;
     rv = sMozillaEmbedPrivate->StartupProfile(sProfileDir, sProfileName);
     NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Warning: Failed to start up profiles.\n");
+#ifdef MOZ_NSIAPPSHELL_HAVE_SPINUP_
+    // XXX startup appshell service?
+    // XXX create offscreen window for appshell service?
+    // XXX remove X prop from offscreen window?
+    
+    nsCOMPtr<nsIAppShell> appShell;
+    appShell = do_CreateInstance(kAppShellCID);
+    if (!appShell) {
+      NS_WARNING("Failed to create appshell in EmbedPrivate::PushStartup!\n");
+      return;
+    }
+    sAppShell = appShell.get();
+    NS_ADDREF(sAppShell);
+    sAppShell->Create(0, nsnull);
+    sAppShell->Spinup();
+#endif
   }
 }
 
@@ -468,6 +487,14 @@
     // shut down the profiles
     sMozillaEmbedPrivate->ShutdownProfile();
 
+#ifdef MOZ_NSIAPPSHELL_HAVE_SPINUP_
+    if (sAppShell) {
+      // Shutdown the appshell service.
+      sAppShell->Spindown();
+      NS_RELEASE(sAppShell);
+      sAppShell = 0;
+    }
+#endif
     delete sMozillaEmbedPrivate;
     // shut down XPCOM/Embedding
     NS_TermEmbedding();




More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index