Bug 1878973 [wpt PR 44428] - [wptserve] Move the TLS handshake to the per-accept...
[gecko.git] / dom / webbrowserpersist / WebBrowserPersistLocalDocument.h
blobc1af8acd54995439ae11301cbb567d5e13fd91b4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef WebBrowserPersistLocalDocument_h__
8 #define WebBrowserPersistLocalDocument_h__
10 #include "mozilla/NotNull.h"
11 #include "nsCOMPtr.h"
12 #include "nsCycleCollectionParticipant.h"
13 #include "nsIURI.h"
14 #include "nsIWebBrowserPersistDocument.h"
16 class nsIDocumentEncoder;
17 class nsISHEntry;
19 namespace mozilla {
21 namespace dom {
22 class Document;
25 class WebBrowserPersistLocalDocument final
26 : public nsIWebBrowserPersistDocument {
27 public:
28 explicit WebBrowserPersistLocalDocument(dom::Document* aDocument);
30 NotNull<const Encoding*> GetCharacterSet() const;
31 uint32_t GetPersistFlags() const;
32 nsIURI* GetBaseURI() const;
34 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
35 NS_DECL_NSIWEBBROWSERPERSISTDOCUMENT
37 NS_DECL_CYCLE_COLLECTION_CLASS(WebBrowserPersistLocalDocument)
39 private:
40 RefPtr<dom::Document> mDocument;
41 uint32_t mPersistFlags;
43 void DecideContentType(nsACString& aContentType);
44 nsresult GetDocEncoder(const nsACString& aContentType, uint32_t aEncoderFlags,
45 nsIDocumentEncoder** aEncoder);
47 virtual ~WebBrowserPersistLocalDocument();
50 } // namespace mozilla
52 #endif // WebBrowserPersistLocalDocument_h__