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"
12 #include "nsCycleCollectionParticipant.h"
14 #include "nsIWebBrowserPersistDocument.h"
16 class nsIDocumentEncoder
;
25 class WebBrowserPersistLocalDocument final
26 : public nsIWebBrowserPersistDocument
{
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
)
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__