From db5c09a6f9563cc5ed443fb222de4e0c6bf438c1 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 4 Apr 2008 12:12:59 +0000 Subject: Add nsIPromptService2. svn path=/branches/gnome-2-22/; revision=8187 --- embed/mozilla/EphyPromptService.cpp | 20 +++++++++----------- embed/mozilla/EphyPromptService.h | 18 +++++++++--------- 2 files changed, 18 insertions(+), 20 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/EphyPromptService.cpp b/embed/mozilla/EphyPromptService.cpp index 3229a89da..a710259d6 100644 --- a/embed/mozilla/EphyPromptService.cpp +++ b/embed/mozilla/EphyPromptService.cpp @@ -39,8 +39,7 @@ #include "AutoModalDialog.h" #include "EphyUtils.h" -#undef ENABLE_AUTHPROMPT2 -#ifdef ENABLE_AUTHPROMPT2 +#ifdef HAVE_GECKO_1_9 #include #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 @@ Prompter::ConvertAndEscapeButtonText(const PRUnichar *aText, 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 @@ EphyPromptService::ShowNonBlockingAlert (nsIDOMWindow *aParent, #endif /* HAVE_NSINONBLOCKINGALERTSERVICE_H */ -#ifdef ENABLE_AUTHPROMPT2 +#ifdef HAVE_GECKO_1_9 static void NS_GetAuthHostPort(nsIChannel* aChannel, nsIAuthInformation* aAuthInfo, @@ -1114,4 +1112,4 @@ NS_METHOD EphyPromptService::AsyncPromptAuth(nsIDOMWindow *aParent, return NS_ERROR_NOT_IMPLEMENTED; } -#endif /* ENABLE_AUTHPROMPT2 */ +#endif /* HAVE_GECKO_1_9 */ diff --git a/embed/mozilla/EphyPromptService.h b/embed/mozilla/EphyPromptService.h index 0c2b1fa02..c07c395c9 100644 --- a/embed/mozilla/EphyPromptService.h +++ b/embed/mozilla/EphyPromptService.h @@ -21,16 +21,16 @@ #ifndef EPHY_PROMPT_SERVICE_H #define EPHY_PROMPT_SERVICE_H +#ifdef HAVE_GECKO_1_9 +#include +#else #include +#endif #if HAVE_NSINONBLOCKINGALERTSERVICE_H #include #endif -#ifdef ENABLE_AUTHPROMPT2 -#include -#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 @@ class EphyPromptService : 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 @@ public: virtual ~EphyPromptService(); protected: -#ifdef ENABLE_AUTHPROMPT2 +#ifdef HAVE_GECKO_1_9 static nsresult PromptPasswordAdapter(nsIPromptService* aService, nsIDOMWindow* aParent, nsIChannel* aChannel, @@ -71,7 +71,7 @@ public: const PRUnichar* aCheckLabel, PRBool* aCheckValue, PRBool* retval); -#endif /* ENABLE_AUTHPROMPT2 */ +#endif /* HAVE_GECKO_1_9 */ }; #endif /* EPHY_PROMPT_SERVICE_H */ -- cgit v1.2.3