epiphany r8114 - trunk/embed/mozilla
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8114 - trunk/embed/mozilla
- Date: Sun, 16 Mar 2008 21:00:39 +0000 (GMT)
Author: chpe
Date: Sun Mar 16 21:00:39 2008
New Revision: 8114
URL: http://svn.gnome.org/viewvc/epiphany?rev=8114&view=rev
Log:
Try to fix the build on 1.8.
Modified:
trunk/embed/mozilla/EphyPromptService.cpp
trunk/embed/mozilla/EphyPromptService.h
Modified: trunk/embed/mozilla/EphyPromptService.cpp
==============================================================================
--- trunk/embed/mozilla/EphyPromptService.cpp (original)
+++ trunk/embed/mozilla/EphyPromptService.cpp Sun Mar 16 21:00:39 2008
@@ -31,7 +31,6 @@
#include <nsCOMPtr.h>
#include <nsIDOMWindow.h>
#include <nsServiceManagerUtils.h>
-#include <nsIStringBundle.h>
#include "ephy-embed-shell.h"
#include "ephy-gui.h"
@@ -40,6 +39,9 @@
#include "AutoModalDialog.h"
#include "EphyUtils.h"
+#undef ENABLE_AUTHPROMPT2
+#ifdef ENABLE_AUTHPROMPT2
+#include <nsIStringBundle.h>
#include "EphyPromptService.h"
#include "nsIChannel.h"
#include "nsIProxiedChannel.h"
@@ -49,6 +51,7 @@
#include "nsNetUtil.h"
#include "nsIIDNService.h"
#include "nsIAuthInformation.h"
+#endif /* ENABLE_AUTHPROMPT2 */
#define TIMEOUT 1000 /* ms */
#define TIMEOUT_DATA_KEY "timeout"
@@ -648,15 +651,18 @@
}
/* FIXME: needs THREADSAFE? */
-#if HAVE_NSINONBLOCKINGALERTSERVICE_H
-NS_IMPL_ISUPPORTS3 (EphyPromptService,
+#ifdef ENABLE_AUTHPROMPT2 /* gecko 1.9 only */
+NS_IMPL_THEADSAFE_ISUPPORTS3 (EphyPromptService,
+ nsIPromptService,
+ nsIPromptService2,
+ nsINonBlockingAlertService)
+#elif defined(HAVE_NSINONBLOCKINGALERTSERVICE_H)
+NS_IMPL_ISUPPORTS2 (EphyPromptService,
nsIPromptService,
- nsIPromptService2,
nsINonBlockingAlertService)
#else
-NS_IMPL_ISUPPORTS2 (EphyPromptService,
- nsIPromptService,
- nsIPromptService2)
+NS_IMPL_ISUPPORTS1 (EphyPromptService,
+ nsIPromptService)
#endif
EphyPromptService::EphyPromptService()
@@ -894,6 +900,8 @@
#endif /* HAVE_NSINONBLOCKINGALERTSERVICE_H */
+#ifdef ENABLE_AUTHPROMPT2
+
static void
NS_GetAuthHostPort(nsIChannel* aChannel, nsIAuthInformation* aAuthInfo,
PRBool machineProcessing, nsCString& host, PRInt32* port)
@@ -1104,3 +1112,5 @@
{
return NS_ERROR_NOT_IMPLEMENTED;
}
+
+#endif /* ENABLE_AUTHPROMPT2 */
Modified: trunk/embed/mozilla/EphyPromptService.h
==============================================================================
--- trunk/embed/mozilla/EphyPromptService.h (original)
+++ trunk/embed/mozilla/EphyPromptService.h Sun Mar 16 21:00:39 2008
@@ -22,12 +22,15 @@
#define EPHY_PROMPT_SERVICE_H
#include <nsIPromptService.h>
-#include <nsIPromptService2.h>
#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, \
@@ -35,7 +38,12 @@
#define EPHY_PROMPT_SERVICE_CLASSNAME "Epiphany Prompt Service"
-class EphyPromptService : public nsIPromptService2
+class EphyPromptService :
+#ifdef ENABLE_AUTHPROMPT2
+ public nsIPromptService2
+#else
+ public nsIPromptService
+#endif
#if HAVE_NSINONBLOCKINGALERTSERVICE_H
, public nsINonBlockingAlertService
#endif
@@ -43,7 +51,9 @@
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPROMPTSERVICE
+#ifdef ENABLE_AUTHPROMPT2
NS_DECL_NSIPROMPTSERVICE2
+#endif
#if HAVE_NSINONBLOCKINGALERTSERVICE_H
NS_DECL_NSINONBLOCKINGALERTSERVICE
#endif
@@ -52,6 +62,7 @@
virtual ~EphyPromptService();
protected:
+#ifdef ENABLE_AUTHPROMPT2
static nsresult PromptPasswordAdapter(nsIPromptService* aService,
nsIDOMWindow* aParent,
nsIChannel* aChannel,
@@ -60,6 +71,7 @@
const PRUnichar* aCheckLabel,
PRBool* aCheckValue,
PRBool* retval);
+#endif /* ENABLE_AUTHPROMPT2 */
};
#endif /* EPHY_PROMPT_SERVICE_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]