aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-04-04 20:12:59 +0800
committerChristian Persch <chpe@src.gnome.org>2008-04-04 20:12:59 +0800
commitdb5c09a6f9563cc5ed443fb222de4e0c6bf438c1 (patch)
tree43507c841d876db30820d988163c51b242d5e1bd
parent5d59926a650d41b1da7a63226582844b8c327faa (diff)
downloadgsoc2013-epiphany-db5c09a6f9563cc5ed443fb222de4e0c6bf438c1.tar
gsoc2013-epiphany-db5c09a6f9563cc5ed443fb222de4e0c6bf438c1.tar.gz
gsoc2013-epiphany-db5c09a6f9563cc5ed443fb222de4e0c6bf438c1.tar.bz2
gsoc2013-epiphany-db5c09a6f9563cc5ed443fb222de4e0c6bf438c1.tar.lz
gsoc2013-epiphany-db5c09a6f9563cc5ed443fb222de4e0c6bf438c1.tar.xz
gsoc2013-epiphany-db5c09a6f9563cc5ed443fb222de4e0c6bf438c1.tar.zst
gsoc2013-epiphany-db5c09a6f9563cc5ed443fb222de4e0c6bf438c1.zip
Add nsIPromptService2.
svn path=/branches/gnome-2-22/; revision=8187
-rw-r--r--embed/mozilla/EphyPromptService.cpp20
-rw-r--r--embed/mozilla/EphyPromptService.h18
2 files changed, 18 insertions, 20 deletions
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 <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 @@ 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 <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 @@ 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 */