epiphany r8226 - branches/gnome-2-22/embed/mozilla



Author: chpe
Date: Sun May 18 21:49:56 2008
New Revision: 8226
URL: http://svn.gnome.org/viewvc/epiphany?rev=8226&view=rev

Log:
Implement dummy nsIDownloadHistory interface on GlobalHistory.


Modified:
   branches/gnome-2-22/embed/mozilla/GlobalHistory.cpp
   branches/gnome-2-22/embed/mozilla/GlobalHistory.h
   branches/gnome-2-22/embed/mozilla/MozRegisterComponents.cpp

Modified: branches/gnome-2-22/embed/mozilla/GlobalHistory.cpp
==============================================================================
--- branches/gnome-2-22/embed/mozilla/GlobalHistory.cpp	(original)
+++ branches/gnome-2-22/embed/mozilla/GlobalHistory.cpp	Sun May 18 21:49:56 2008
@@ -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 @@
 }
 
 #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 */

Modified: branches/gnome-2-22/embed/mozilla/GlobalHistory.h
==============================================================================
--- branches/gnome-2-22/embed/mozilla/GlobalHistory.h	(original)
+++ branches/gnome-2-22/embed/mozilla/GlobalHistory.h	Sun May 18 21:49:56 2008
@@ -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 @@
 #else
 class MozGlobalHistory: public nsIGlobalHistory2
 #endif /* HAVE_NSIGLOBALHISTORY3_H */
+#ifdef HAVE_GECKO_1_9
+                       , public nsIDownloadHistory
+#endif
 {
 	public:
 		MozGlobalHistory ();
@@ -59,6 +65,9 @@
 #ifdef HAVE_NSIGLOBALHISTORY3_H
 		NS_DECL_NSIGLOBALHISTORY3
 #endif /* HAVE_NSIGLOBALHISTORY3_H */
+#ifdef HAVE_GECKO_1_9
+                NS_DECL_NSIDOWNLOADHISTORY
+#endif
 
 	private:
 		EphyHistory *mGlobalHistory;

Modified: branches/gnome-2-22/embed/mozilla/MozRegisterComponents.cpp
==============================================================================
--- branches/gnome-2-22/embed/mozilla/MozRegisterComponents.cpp	(original)
+++ branches/gnome-2-22/embed/mozilla/MozRegisterComponents.cpp	Sun May 18 21:49:56 2008
@@ -200,6 +200,14 @@
 		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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]