diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/ContentHandler.h | 4 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/EphyContentPolicy.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/EphyHeaderSniffer.h | 4 | ||||
-rw-r--r-- | embed/mozilla/EphyHistoryListener.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/EphySidebar.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/EphySingle.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/EphyUtils.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/EventContext.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/FilePicker.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/FilePicker.h | 4 | ||||
-rw-r--r-- | embed/mozilla/GlobalHistory.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/GtkNSSClientAuthDialogs.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/GtkNSSDialogs.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/MozDownload.cpp | 55 | ||||
-rw-r--r-- | embed/mozilla/MozDownload.h | 13 | ||||
-rw-r--r-- | embed/mozilla/mozilla-download.cpp | 12 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 4 |
19 files changed, 91 insertions, 53 deletions
diff --git a/embed/mozilla/ContentHandler.h b/embed/mozilla/ContentHandler.h index 6a8c58472..1df7e37cf 100644 --- a/embed/mozilla/ContentHandler.h +++ b/embed/mozilla/ContentHandler.h @@ -28,9 +28,9 @@ #include <libgnomevfs/gnome-vfs-mime-handlers.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsCOMPtr.h> #include <nsISupports.h> #include <nsIURI.h> diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 21f6872ff..ac7771c89 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -70,9 +70,9 @@ #include "nsIDOMWindow2.h" #include "nsIDOMDocumentView.h" #include "nsIDOMAbstractView.h" -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include "nsEmbedString.h" -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include "nsMemory.h" #include "nsIChannel.h" #include "nsIScriptSecurityManager.h" diff --git a/embed/mozilla/EphyContentPolicy.cpp b/embed/mozilla/EphyContentPolicy.cpp index 9679c0f2a..bbfa59814 100644 --- a/embed/mozilla/EphyContentPolicy.cpp +++ b/embed/mozilla/EphyContentPolicy.cpp @@ -32,9 +32,9 @@ #include <nsCOMPtr.h> #include <nsIURI.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #define CONF_LOCKDOWN_DISABLE_UNSAFE_PROTOCOLS "/apps/epiphany/lockdown/disable_unsafe_protocols" #define CONF_LOCKDOWN_ADDITIONAL_SAFE_PROTOCOLS "/apps/epiphany/lockdown/additional_safe_protocols" diff --git a/embed/mozilla/EphyHeaderSniffer.h b/embed/mozilla/EphyHeaderSniffer.h index 309bbaf41..2289156c8 100644 --- a/embed/mozilla/EphyHeaderSniffer.h +++ b/embed/mozilla/EphyHeaderSniffer.h @@ -50,9 +50,9 @@ #include <nsIDOMDocument.h> #include <nsIAuthPrompt.h> #include <nsIPromptService.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 class EphyHeaderSniffer : public nsIWebProgressListener, public nsIAuthPrompt diff --git a/embed/mozilla/EphyHistoryListener.cpp b/embed/mozilla/EphyHistoryListener.cpp index 1fcacd198..56f8c32a2 100644 --- a/embed/mozilla/EphyHistoryListener.cpp +++ b/embed/mozilla/EphyHistoryListener.cpp @@ -27,9 +27,9 @@ #include "ephy-debug.h" -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsCOMPtr.h> #include <nsIServiceManager.h> #include <nsIDocumentLoader.h> diff --git a/embed/mozilla/EphySidebar.cpp b/embed/mozilla/EphySidebar.cpp index 953f8561c..479ae63ad 100644 --- a/embed/mozilla/EphySidebar.cpp +++ b/embed/mozilla/EphySidebar.cpp @@ -27,9 +27,9 @@ #include <nsCRT.h> #include <nsIProgrammingLanguage.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include "EphySidebar.h" #include "ephy-embed-shell.h" diff --git a/embed/mozilla/EphySingle.cpp b/embed/mozilla/EphySingle.cpp index 2d17a6baf..4bd1915ea 100644 --- a/embed/mozilla/EphySingle.cpp +++ b/embed/mozilla/EphySingle.cpp @@ -27,9 +27,9 @@ #include "ephy-debug.h" -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsIURI.h> #include <nsIPermissionManager.h> #include <nsICookieManager.h> diff --git a/embed/mozilla/EphyUtils.cpp b/embed/mozilla/EphyUtils.cpp index 3a5407cb8..0888ed674 100644 --- a/embed/mozilla/EphyUtils.cpp +++ b/embed/mozilla/EphyUtils.cpp @@ -28,9 +28,9 @@ #include "print-dialog.h" #include <nsIServiceManager.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsIWindowWatcher.h> #include <nsIEmbeddingSiteWindow.h> #include <nsIWebBrowserChrome.h> diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp index da746946d..21a4f5096 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -31,9 +31,9 @@ #include <nsIInterfaceRequestor.h> #include <nsIServiceManager.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsIDOMEventTarget.h> #include <nsIDOMHTMLInputElement.h> #include <nsIDOMHTMLObjectElement.h> diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp index e4b4e75fb..58559bc0d 100644 --- a/embed/mozilla/FilePicker.cpp +++ b/embed/mozilla/FilePicker.cpp @@ -27,9 +27,9 @@ #include "EphyUtils.h" #include <nsCOMPtr.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsIServiceManager.h> #include <nsIURI.h> #include <nsIFileURL.h> diff --git a/embed/mozilla/FilePicker.h b/embed/mozilla/FilePicker.h index bc88d5b61..1c2283255 100644 --- a/embed/mozilla/FilePicker.h +++ b/embed/mozilla/FilePicker.h @@ -24,9 +24,9 @@ #include <nsIFilePicker.h> #include <nsISupports.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include "ephy-file-chooser.h" diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp index b5bf2e3bb..4e4bc29b3 100644 --- a/embed/mozilla/GlobalHistory.cpp +++ b/embed/mozilla/GlobalHistory.cpp @@ -28,9 +28,9 @@ #include "GlobalHistory.h" #include <nsIURI.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 NS_IMPL_ISUPPORTS1 (MozGlobalHistory, nsIGlobalHistory2) diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp index cbfa4b2c1..f047872be 100644 --- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp +++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp @@ -29,9 +29,9 @@ #include <nsIServiceManager.h> #include <nsIInterfaceRequestor.h> #include <nsIInterfaceRequestorUtils.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <gtk/gtkdialog.h> #include <gtk/gtkimage.h> diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp index 092540fdd..e2a412014 100644 --- a/embed/mozilla/GtkNSSDialogs.cpp +++ b/embed/mozilla/GtkNSSDialogs.cpp @@ -45,9 +45,9 @@ #include <nsICRLInfo.h> #include <nsISimpleEnumerator.h> #include <nsIArray.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <gconf/gconf-client.h> #include <gtk/gtkdialog.h> diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index 669455615..f04b1f5d1 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -57,9 +57,9 @@ #include <glib/gi18n.h> #include <nsIFileURL.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsMemory.h> #include <errno.h> @@ -68,6 +68,8 @@ const char* const persistContractID = "@mozilla.org/embedding/browser/nsWebBrowserPersist;1"; MozDownload::MozDownload() : + mTotalProgress(-1), + mCurrentProgress(0), mMaxSize(-1), mStatus(NS_OK), mEmbedPersist(nsnull), @@ -84,7 +86,7 @@ MozDownload::~MozDownload() } #ifdef HAVE_NSITRANSFER_H -NS_IMPL_ISUPPORTS2(MozDownload, nsIWebProgressListener, nsITransfer) +NS_IMPL_ISUPPORTS3(MozDownload, nsIWebProgressListener, nsIWebProgressListener2, nsITransfer) #else NS_IMPL_ISUPPORTS3(MozDownload, nsIWebProgressListener, nsIDownload, nsITransfer) #endif @@ -246,7 +248,7 @@ MozDownload::SetDisplayName(const PRUnichar * aDisplayName) #endif /* !HAVE_NSITRANSFER_H */ NS_IMETHODIMP -MozDownload::GetTotalProgress(PRInt32 *aTotalProgress) +MozDownload::GetTotalProgress(PRInt64 *aTotalProgress) { NS_ENSURE_ARG_POINTER(aTotalProgress); *aTotalProgress = mTotalProgress; @@ -255,7 +257,7 @@ MozDownload::GetTotalProgress(PRInt32 *aTotalProgress) } NS_IMETHODIMP -MozDownload::GetCurrentProgress(PRInt32 *aCurrentProgress) +MozDownload::GetCurrentProgress(PRInt64 *aCurrentProgress) { NS_ENSURE_ARG_POINTER(aCurrentProgress); *aCurrentProgress = mCurrentProgress; @@ -290,6 +292,7 @@ MozDownload::GetMIMEInfo(nsIMIMEInfo **aMIMEInfo) return NS_OK; } +#ifndef HAVE_NSITRANSFER_H NS_IMETHODIMP MozDownload::GetListener(nsIWebProgressListener **aListener) { @@ -303,11 +306,15 @@ MozDownload::SetListener(nsIWebProgressListener *aListener) { return NS_ERROR_NOT_IMPLEMENTED; } +#endif NS_IMETHODIMP MozDownload::GetObserver(nsIObserver **aObserver) { - return NS_ERROR_NOT_IMPLEMENTED; + *aObserver = mObserver; + NS_IF_ADDREF (*aObserver); + + return NS_OK; } NS_IMETHODIMP @@ -430,10 +437,38 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest, return NS_OK; } -NS_IMETHODIMP -MozDownload::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, - PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, - PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress) +#ifdef HAVE_NSITRANSFER_H +NS_IMETHODIMP +MozDownload::OnProgressChange (nsIWebProgress *aWebProgress, + nsIRequest *aRequest, + PRInt32 aCurSelfProgress, + PRInt32 aMaxSelfProgress, + PRInt32 aCurTotalProgress, + PRInt32 aMaxTotalProgress) +{ + return OnProgressChange64 (aWebProgress, aRequest, + aCurSelfProgress, aMaxSelfProgress, + aCurTotalProgress, aMaxTotalProgress); +} + +/* void onProgressChange64 (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long long aCurSelfProgress, in long long aMaxSelfProgress, in long long aCurTotalProgress, + in long long aMaxTotalProgress); */ +NS_IMETHODIMP +MozDownload::OnProgressChange64 (nsIWebProgress *aWebProgress, + nsIRequest *aRequest, + PRInt64 aCurSelfProgress, + PRInt64 aMaxSelfProgress, + PRInt64 aCurTotalProgress, + PRInt64 aMaxTotalProgress) +#else /* !HAVE_NSITRANSFER_H */ +NS_IMETHODIMP +MozDownload::OnProgressChange (nsIWebProgress *aWebProgress, + nsIRequest *aRequest, + PRInt32 aCurSelfProgress, + PRInt32 aMaxSelfProgress, + PRInt32 aCurTotalProgress, + PRInt32 aMaxTotalProgress) +#endif /* HAVE_NSITRANSFER_H */ { if (mMaxSize >= 0 && ((aMaxTotalProgress > 0 && mMaxSize < aMaxTotalProgress) || diff --git a/embed/mozilla/MozDownload.h b/embed/mozilla/MozDownload.h index c4592ec5d..52c06c94f 100644 --- a/embed/mozilla/MozDownload.h +++ b/embed/mozilla/MozDownload.h @@ -108,6 +108,9 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIWEBPROGRESSLISTENER +#ifdef HAVE_NSITRANSFER_H + NS_DECL_NSIWEBPROGRESSLISTENER2 +#endif NS_DECL_NSITRANSFER #ifndef HAVE_NSITRANSFER_H NS_DECL_NSIDOWNLOAD @@ -125,8 +128,8 @@ public: virtual void Resume(); nsresult GetState (EphyDownloadState *aDownloadState); - nsresult GetCurrentProgress (PRInt32 *aCurrentProgress); - nsresult GetTotalProgress (PRInt32 *aTProgress); + nsresult GetCurrentProgress (PRInt64 *aCurrentProgress); + nsresult GetTotalProgress (PRInt64 *aTProgress); nsresult GetElapsedTime (PRInt64 *aTProgress); nsresult InitForEmbed (nsIURI *aSource, nsIURI *aTarget, const PRUnichar *aDisplayName, nsIMIMEInfo *aMIMEInfo, @@ -143,9 +146,9 @@ protected: PRInt64 mElapsed; PRInt32 mInterval; PRInt32 mPercentComplete; - PRInt32 mTotalProgress; - PRInt32 mCurrentProgress; - PRInt32 mMaxSize; + PRInt64 mTotalProgress; + PRInt64 mCurrentProgress; + PRInt64 mMaxSize; nsresult mStatus; diff --git a/embed/mozilla/mozilla-download.cpp b/embed/mozilla/mozilla-download.cpp index f7e9cf78b..73a26a40c 100644 --- a/embed/mozilla/mozilla-download.cpp +++ b/embed/mozilla/mozilla-download.cpp @@ -26,9 +26,9 @@ #include "ephy-debug.h" -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsMemory.h> static void mozilla_download_class_init (MozillaDownloadClass *klass); @@ -109,11 +109,11 @@ impl_get_source (EphyDownload *download) return g_strdup (spec.get()); } -static long +static gint64 impl_get_current_progress (EphyDownload *download) { MozDownload *mozDownload; - PRInt32 progress; + PRInt64 progress; mozDownload = MOZILLA_DOWNLOAD (download)->priv->moz_download; @@ -135,11 +135,11 @@ impl_get_state (EphyDownload *download) return state; } -static long +static gint64 impl_get_total_progress (EphyDownload *download) { MozDownload *mozDownload; - PRInt32 progress; + PRInt64 progress; mozDownload = MOZILLA_DOWNLOAD (download)->priv->moz_download; diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index d6bfbb061..c5b16c728 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -49,9 +49,9 @@ #include <nsCOMPtr.h> #include <nsMemory.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsIPrefService.h> #include <nsIServiceManager.h> #include <nsIWindowWatcher.h> diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 379e0f90f..016820e14 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -36,9 +36,9 @@ #include "EphyUtils.h" #include <gtkmozembed.h> -#define MOZILLA_STRICT_API +#undef MOZILLA_INTERNAL_API #include <nsEmbedString.h> -#undef MOZILLA_STRICT_API +#define MOZILLA_INTERNAL_API 1 #include <nsMemory.h> #include <nsIURI.h> #include <nsIRequest.h> |