diff options
author | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-17 01:28:46 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-17 01:28:46 +0800 |
commit | 24fc218c90c70a06011a851df6991bf34b72d6c3 (patch) | |
tree | 6bb9ee7e434a3b10e636634cbaaa997e6ccebf1f /embed/mozilla/EphyHeaderSniffer.h | |
parent | b7a8e995fde6c3cf6ac82ea2390c3c4b510024c5 (diff) | |
download | gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.gz gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.bz2 gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.lz gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.xz gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.zst gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.zip |
Merge new-downloader branch. We reworked the backend, the user
interface is still incomplete.
Diffstat (limited to 'embed/mozilla/EphyHeaderSniffer.h')
-rw-r--r-- | embed/mozilla/EphyHeaderSniffer.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/embed/mozilla/EphyHeaderSniffer.h b/embed/mozilla/EphyHeaderSniffer.h index 8ef6afa01..9124cfa16 100644 --- a/embed/mozilla/EphyHeaderSniffer.h +++ b/embed/mozilla/EphyHeaderSniffer.h @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ - #pragma once +#include "mozilla-embed-persist.h" #include "nsString.h" #include "nsIWebProgressListener.h" @@ -46,23 +46,14 @@ #include "nsIInputStream.h" #include "nsIDOMDocument.h" - -typedef enum -{ - eSaveFormatUnspecified = 0, - eSaveFormatPlainText, // items should match the MENU in resources - eSaveFormatHTML, - eSaveFormatHTMLComplete -} ESaveFormat; - // Implementation of a header sniffer class that is used when saving Web pages and images. class EphyHeaderSniffer : public nsIWebProgressListener { public: - EphyHeaderSniffer(nsIWebBrowserPersist* aPersist, nsIFile* aFile, nsIURI* aURL, - nsIDOMDocument* aDocument, nsIInputStream* aPostData, - const nsAString& aSuggestedFilename, PRBool aBypassCache, - ESaveFormat aSaveFormat = eSaveFormatUnspecified); + EphyHeaderSniffer(nsIWebBrowserPersist* aPersist, MozillaEmbedPersist *aEmbedPersist, + nsIFile* aFile, nsIURI* aURL, + nsIDOMDocument* aDocument, nsIInputStream* aPostData, + const nsAString& aSuggestedFilename, PRBool aBypassCache); virtual ~EphyHeaderSniffer(); NS_DECL_ISUPPORTS @@ -70,19 +61,19 @@ public: protected: - nsresult PerformSave(nsIURI* inOriginalURI, const ESaveFormat inSaveFormat); + nsresult PerformSave(nsIURI* inOriginalURI); nsresult InitiateDownload(nsISupports* inSourceData, nsILocalFile* inDestFile, nsIURI* inOriginalURI); private: nsIWebBrowserPersist* mPersist; // Weak. It owns us as a listener. + MozillaEmbedPersist *mEmbedPersist; nsCOMPtr<nsIFile> mTmpFile; nsCOMPtr<nsIURI> mURL; nsCOMPtr<nsIDOMDocument> mDocument; nsCOMPtr<nsIInputStream> mPostData; nsString mDefaultFilename; PRBool mBypassCache; - ESaveFormat mSaveFormat; nsCString mContentType; nsCString mContentDisposition; }; |