aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-05-19 05:49:56 +0800
committerChristian Persch <chpe@src.gnome.org>2008-05-19 05:49:56 +0800
commit0bd4d3b1054878dab687f9d39411231106128280 (patch)
tree4a661c966bfec40a6a74bcac70909cd43a4778b9 /embed/mozilla
parent0c8f4f513befb62ae2488ec40eedd18adb46a33e (diff)
downloadgsoc2013-epiphany-0bd4d3b1054878dab687f9d39411231106128280.tar
gsoc2013-epiphany-0bd4d3b1054878dab687f9d39411231106128280.tar.gz
gsoc2013-epiphany-0bd4d3b1054878dab687f9d39411231106128280.tar.bz2
gsoc2013-epiphany-0bd4d3b1054878dab687f9d39411231106128280.tar.lz
gsoc2013-epiphany-0bd4d3b1054878dab687f9d39411231106128280.tar.xz
gsoc2013-epiphany-0bd4d3b1054878dab687f9d39411231106128280.tar.zst
gsoc2013-epiphany-0bd4d3b1054878dab687f9d39411231106128280.zip
Implement dummy nsIDownloadHistory interface on GlobalHistory.
svn path=/branches/gnome-2-22/; revision=8226
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/GlobalHistory.cpp18
-rw-r--r--embed/mozilla/GlobalHistory.h9
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp8
3 files changed, 33 insertions, 2 deletions
diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp
index efcda79f9..5fc85c351 100644
--- a/embed/mozilla/GlobalHistory.cpp
+++ b/embed/mozilla/GlobalHistory.cpp
@@ -31,11 +31,12 @@
#include "GlobalHistory.h"
-
#define MAX_TITLE_LENGTH 2048
#define MAX_URL_LENGTH 16384
-#ifdef HAVE_NSIGLOBALHISTORY3_H
+#if defined(HAVE_GECKO_1_9)
+NS_IMPL_ISUPPORTS3 (MozGlobalHistory, nsIGlobalHistory2, nsIGlobalHistory3, nsIDownloadHistory)
+#elif defined (HAVE_NSIGLOBALHISTORY3_H)
NS_IMPL_ISUPPORTS2 (MozGlobalHistory, nsIGlobalHistory2, nsIGlobalHistory3)
#else
NS_IMPL_ISUPPORTS1 (MozGlobalHistory, nsIGlobalHistory2)
@@ -223,3 +224,16 @@ MozGlobalHistory::AddDocumentRedirect(nsIChannel *aOldChannel,
}
#endif /* HAVE_NSIGLOBALHISTORY3_H */
+
+#ifdef HAVE_GECKO_1_9
+
+/* nsIDownloadHistory */
+
+/* void addDownload (in nsIURI aSource, [optional] in nsIURI aReferrer, [optional] in PRTime aStartTime); */
+NS_IMETHODIMP
+MozGlobalHistory::AddDownload (nsIURI *aSource, nsIURI *aReferrer, PRTime aStartTime)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+#endif /* HAVE_GECKO_1_9 */
diff --git a/embed/mozilla/GlobalHistory.h b/embed/mozilla/GlobalHistory.h
index 8397874a0..f4464082f 100644
--- a/embed/mozilla/GlobalHistory.h
+++ b/embed/mozilla/GlobalHistory.h
@@ -22,6 +22,9 @@
#ifndef EPHY_GLOBAL_HISTORY_H
#define EPHY_GLOBAL_HISTORY_H
+#ifdef HAVE_GECKO_1_9
+#include <nsIDownloadHistory.h>
+#endif
#ifdef HAVE_NSIGLOBALHISTORY3_H
#include <nsIGlobalHistory3.h>
#else
@@ -49,6 +52,9 @@ class MozGlobalHistory: public nsIGlobalHistory3
#else
class MozGlobalHistory: public nsIGlobalHistory2
#endif /* HAVE_NSIGLOBALHISTORY3_H */
+#ifdef HAVE_GECKO_1_9
+ , public nsIDownloadHistory
+#endif
{
public:
MozGlobalHistory ();
@@ -59,6 +65,9 @@ class MozGlobalHistory: public nsIGlobalHistory2
#ifdef HAVE_NSIGLOBALHISTORY3_H
NS_DECL_NSIGLOBALHISTORY3
#endif /* HAVE_NSIGLOBALHISTORY3_H */
+#ifdef HAVE_GECKO_1_9
+ NS_DECL_NSIDOWNLOADHISTORY
+#endif
private:
EphyHistory *mGlobalHistory;
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index 3960052bf..73e946170 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -200,6 +200,14 @@ static const nsModuleComponentInfo sAppComps[] = {
NS_GLOBALHISTORY2_CONTRACTID,
MozGlobalHistoryConstructor
},
+#ifdef HAVE_GECKO_1_9
+ {
+ EPHY_GLOBALHISTORY_CLASSNAME,
+ EPHY_GLOBALHISTORY_CID,
+ NS_DOWNLOADHISTORY_CONTRACTID,
+ MozGlobalHistoryConstructor
+ },
+#endif
{
GECKO_PRINT_SERVICE_CLASSNAME,
GECKO_PRINT_SERVICE_IID,