summaryrefslogtreecommitdiff
path: root/Source/WebCore/loader/archive/mhtml/MHTMLArchive.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/loader/archive/mhtml/MHTMLArchive.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/loader/archive/mhtml/MHTMLArchive.h')
-rw-r--r--Source/WebCore/loader/archive/mhtml/MHTMLArchive.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/Source/WebCore/loader/archive/mhtml/MHTMLArchive.h b/Source/WebCore/loader/archive/mhtml/MHTMLArchive.h
index 14cd87572..8524659aa 100644
--- a/Source/WebCore/loader/archive/mhtml/MHTMLArchive.h
+++ b/Source/WebCore/loader/archive/mhtml/MHTMLArchive.h
@@ -28,8 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MHTMLArchive_h
-#define MHTMLArchive_h
+#pragma once
#if ENABLE(MHTML)
@@ -41,27 +40,26 @@ class MHTMLParser;
class Page;
class SharedBuffer;
-class MHTMLArchive : public Archive {
+class MHTMLArchive final : public Archive {
public:
- virtual Type type() const { return MHTML; }
+ static Ref<MHTMLArchive> create();
+ static RefPtr<MHTMLArchive> create(const URL&, SharedBuffer&);
- static PassRefPtr<MHTMLArchive> create();
- static PassRefPtr<MHTMLArchive> create(const URL&, SharedBuffer*);
-
- static PassRefPtr<SharedBuffer> generateMHTMLData(Page*);
- // Binary encoding results in smaller MHTML files but they might not work in other browsers.
- static PassRefPtr<SharedBuffer> generateMHTMLDataUsingBinaryEncoding(Page*);
+ static RefPtr<SharedBuffer> generateMHTMLData(Page*);
virtual ~MHTMLArchive();
private:
- static PassRefPtr<SharedBuffer> generateMHTMLData(Page*, bool useBinaryEncoding);
-
friend class MHTMLParser;
+
MHTMLArchive();
+
+ bool shouldLoadFromArchiveOnly() const final { return true; }
+ bool shouldOverrideBaseURL() const final { return true; }
+ bool shouldUseMainResourceEncoding() const final { return false; }
+ bool shouldUseMainResourceURL() const final { return false; }
};
-}
+} // namespace WebCore
-#endif
-#endif
+#endif // ENABLE(MHTML)