aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2007-09-16 20:46:49 +0800
committerChristian Persch <chpe@src.gnome.org>2007-09-16 20:46:49 +0800
commitec183c883b340ae82f5ba22689e5d1a3b9dfa511 (patch)
treef899960936a476450ebe287e57f2a44274f8bb6b /embed
parentbd9419b2f2ef5a17763f740fedb94d27e10281a8 (diff)
downloadgsoc2013-epiphany-ec183c883b340ae82f5ba22689e5d1a3b9dfa511.tar
gsoc2013-epiphany-ec183c883b340ae82f5ba22689e5d1a3b9dfa511.tar.gz
gsoc2013-epiphany-ec183c883b340ae82f5ba22689e5d1a3b9dfa511.tar.bz2
gsoc2013-epiphany-ec183c883b340ae82f5ba22689e5d1a3b9dfa511.tar.lz
gsoc2013-epiphany-ec183c883b340ae82f5ba22689e5d1a3b9dfa511.tar.xz
gsoc2013-epiphany-ec183c883b340ae82f5ba22689e5d1a3b9dfa511.tar.zst
gsoc2013-epiphany-ec183c883b340ae82f5ba22689e5d1a3b9dfa511.zip
Make PromptService QI to nsIPromptService2 (not implemented yet, though).
svn path=/trunk/; revision=7454
Diffstat (limited to 'embed')
-rw-r--r--embed/xulrunner/components/GeckoPromptService.cpp41
-rw-r--r--embed/xulrunner/components/GeckoPromptService.h13
2 files changed, 36 insertions, 18 deletions
diff --git a/embed/xulrunner/components/GeckoPromptService.cpp b/embed/xulrunner/components/GeckoPromptService.cpp
index 317c7487b..7e0abd251 100644
--- a/embed/xulrunner/components/GeckoPromptService.cpp
+++ b/embed/xulrunner/components/GeckoPromptService.cpp
@@ -640,15 +640,9 @@ Prompter::ConvertAndEscapeButtonText(const PRUnichar *aText,
return escaped;
}
-/* FIXME: needs THREADSAFE? */
-#if HAVE_NSINONBLOCKINGALERTSERVICE_H
NS_IMPL_ISUPPORTS2 (GeckoPromptService,
nsIPromptService,
nsINonBlockingAlertService)
-#else
-NS_IMPL_ISUPPORTS1 (GeckoPromptService,
- nsIPromptService)
-#endif
GeckoPromptService::GeckoPromptService()
{
@@ -864,7 +858,38 @@ GeckoPromptService::Select (nsIDOMWindow *aParent,
return NS_OK;
}
-#if HAVE_NSINONBLOCKINGALERTSERVICE_H
+/* nsIPromptService2 */
+
+/* boolean promptAuth (in nsIDOMWindow aParent, in nsIChannel aChannel, in PRUint32 level, in nsIAuthInformation authInfo, in wstring checkboxLabel, inout boolean checkValue); */
+NS_IMETHODIMP
+GeckoPromptService::PromptAuth (nsIDOMWindow *aParent,
+ nsIChannel *aChannel,
+ PRUint32 level,
+ nsIAuthInformation *authInfo,
+ const PRUnichar *checkboxLabel,
+ PRBool *checkValue,
+ PRBool *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* nsICancelable asyncPromptAuth (in nsIDOMWindow aParent, in nsIChannel aChannel, in nsIAuthPromptCallback aCallback, in nsISupports aContext, in PRUint32 level, in nsIAuthInformation authInfo, in wstring checkboxLabel, inout boolean checkValue); */
+NS_IMETHODIMP
+GeckoPromptService::AsyncPromptAuth (nsIDOMWindow *aParent,
+ nsIChannel *aChannel,
+ nsIAuthPromptCallback *aCallback,
+ nsISupports *aContext,
+ PRUint32 level,
+ nsIAuthInformation *authInfo,
+ const PRUnichar *checkboxLabel,
+ PRBool *checkValue,
+ nsICancelable **_retval)
+{
+ /* FIXME implement me */
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* nsINonBlockingAlertService */
/* showNonBlockingAlert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
NS_IMETHODIMP
@@ -880,5 +905,3 @@ GeckoPromptService::ShowNonBlockingAlert (nsIDOMWindow *aParent,
return NS_OK;
}
-
-#endif /* HAVE_NSINONBLOCKINGALERTSERVICE_H */
diff --git a/embed/xulrunner/components/GeckoPromptService.h b/embed/xulrunner/components/GeckoPromptService.h
index b2ef610b8..ce48aded9 100644
--- a/embed/xulrunner/components/GeckoPromptService.h
+++ b/embed/xulrunner/components/GeckoPromptService.h
@@ -22,10 +22,8 @@
#define GECKO_PROMPT_SERVICE_H
#include <nsIPromptService.h>
-
-#if HAVE_NSINONBLOCKINGALERTSERVICE_H
+#include <nsIPromptService2.h>
#include <nsINonBlockingAlertService.h>
-#endif
#define GECKO_PROMPT_SERVICE_CID \
{ /* cadc6035-7c53-4039-823b-004a289d5eb2 */ \
@@ -34,17 +32,14 @@
#define GECKO_PROMPT_SERVICE_CLASSNAME "Gecko Prompt Service"
-class GeckoPromptService : public nsIPromptService
-#if HAVE_NSINONBLOCKINGALERTSERVICE_H
- , public nsINonBlockingAlertService
-#endif
+class GeckoPromptService : public nsIPromptService2,
+ public nsINonBlockingAlertService
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPROMPTSERVICE
-#if HAVE_NSINONBLOCKINGALERTSERVICE_H
+ NS_DECL_NSIPROMPTSERVICE2
NS_DECL_NSINONBLOCKINGALERTSERVICE
-#endif
GeckoPromptService();
virtual ~GeckoPromptService();