epiphany r8187 - branches/gnome-2-22/embed/mozilla



Author: chpe
Date: Fri Apr  4 13:12:59 2008
New Revision: 8187
URL: http://svn.gnome.org/viewvc/epiphany?rev=8187&view=rev

Log:
Add nsIPromptService2.


Modified:
   branches/gnome-2-22/embed/mozilla/EphyPromptService.cpp
   branches/gnome-2-22/embed/mozilla/EphyPromptService.h

Modified: branches/gnome-2-22/embed/mozilla/EphyPromptService.cpp
==============================================================================
--- branches/gnome-2-22/embed/mozilla/EphyPromptService.cpp	(original)
+++ branches/gnome-2-22/embed/mozilla/EphyPromptService.cpp	Fri Apr  4 13:12:59 2008
@@ -39,8 +39,7 @@
 #include "AutoModalDialog.h"
 #include "EphyUtils.h"
 
-#undef ENABLE_AUTHPROMPT2
-#ifdef ENABLE_AUTHPROMPT2
+#ifdef HAVE_GECKO_1_9
 #include <nsIStringBundle.h>
 #include "nsIChannel.h"
 #include "nsIProxiedChannel.h"
@@ -50,7 +49,7 @@
 #include "nsNetUtil.h"
 #include "nsIIDNService.h"
 #include "nsIAuthInformation.h"
-#endif /* ENABLE_AUTHPROMPT2 */
+#endif /* HAVE_GECKO_1_9 */
 
 #include "EphyPromptService.h"
 
@@ -651,12 +650,11 @@
 	return escaped;
 }
 
-/* FIXME: needs THREADSAFE? */
-#ifdef ENABLE_AUTHPROMPT2 /* gecko 1.9 only */
-NS_IMPL_THEADSAFE_ISUPPORTS3 (EphyPromptService,
-                              nsIPromptService,
-                              nsIPromptService2,
-                              nsINonBlockingAlertService)
+#ifdef HAVE_GECKO_1_9
+NS_IMPL_THREADSAFE_ISUPPORTS3 (EphyPromptService,
+                               nsIPromptService,
+                               nsIPromptService2,
+                               nsINonBlockingAlertService)
 #elif defined(HAVE_NSINONBLOCKINGALERTSERVICE_H)
 NS_IMPL_ISUPPORTS2 (EphyPromptService,
 		    nsIPromptService,
@@ -901,7 +899,7 @@
 
 #endif /* HAVE_NSINONBLOCKINGALERTSERVICE_H */
 
-#ifdef ENABLE_AUTHPROMPT2
+#ifdef HAVE_GECKO_1_9
 
 static void
 NS_GetAuthHostPort(nsIChannel* aChannel, nsIAuthInformation* aAuthInfo,
@@ -1114,4 +1112,4 @@
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-#endif /* ENABLE_AUTHPROMPT2 */
+#endif /* HAVE_GECKO_1_9 */

Modified: branches/gnome-2-22/embed/mozilla/EphyPromptService.h
==============================================================================
--- branches/gnome-2-22/embed/mozilla/EphyPromptService.h	(original)
+++ branches/gnome-2-22/embed/mozilla/EphyPromptService.h	Fri Apr  4 13:12:59 2008
@@ -21,16 +21,16 @@
 #ifndef EPHY_PROMPT_SERVICE_H
 #define EPHY_PROMPT_SERVICE_H
 
+#ifdef HAVE_GECKO_1_9
+#include <nsIPromptService2.h>
+#else
 #include <nsIPromptService.h>
+#endif
 
 #if HAVE_NSINONBLOCKINGALERTSERVICE_H
 #include <nsINonBlockingAlertService.h>
 #endif
 
-#ifdef ENABLE_AUTHPROMPT2
-#include <nsIPromptService2.h>
-#endif
-
 #define EPHY_PROMPT_SERVICE_IID				\
 { /* 6e8b90d4-78a6-41c5-98da-b1559a40d30d */		\
   0x6e8b90d4, 0x78a6, 0x41c5,				\
@@ -39,7 +39,7 @@
 #define EPHY_PROMPT_SERVICE_CLASSNAME	"Epiphany Prompt Service"
 
 class EphyPromptService :
-#ifdef ENABLE_AUTHPROMPT2
+#ifdef HAVE_GECKO_1_9
                           public nsIPromptService2
 #else
                           public nsIPromptService
@@ -51,8 +51,8 @@
 public:
 	NS_DECL_ISUPPORTS
 	NS_DECL_NSIPROMPTSERVICE
-#ifdef ENABLE_AUTHPROMPT2
-	NS_DECL_NSIPROMPTSERVICE2
+#ifdef HAVE_GECKO_1_9
+        NS_DECL_NSIPROMPTSERVICE2
 #endif
 #if HAVE_NSINONBLOCKINGALERTSERVICE_H
 	NS_DECL_NSINONBLOCKINGALERTSERVICE
@@ -62,7 +62,7 @@
 	virtual ~EphyPromptService();
 
  protected:
-#ifdef ENABLE_AUTHPROMPT2
+#ifdef HAVE_GECKO_1_9
 	static nsresult PromptPasswordAdapter(nsIPromptService* aService,
 					      nsIDOMWindow* aParent,
 					      nsIChannel* aChannel,
@@ -71,7 +71,7 @@
 					      const PRUnichar* aCheckLabel,
 					      PRBool* aCheckValue,
 					      PRBool* retval);
-#endif /* ENABLE_AUTHPROMPT2 */
+#endif /* HAVE_GECKO_1_9 */
 };
 
 #endif /* EPHY_PROMPT_SERVICE_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]