2018-11-30 22:52:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2015-08-06 00:25:39 +03:00
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef WebBrowserPersistLocalDocument_h__
|
|
|
|
#define WebBrowserPersistLocalDocument_h__
|
|
|
|
|
2020-11-23 19:21:38 +03:00
|
|
|
#include "mozilla/NotNull.h"
|
2015-08-06 00:25:39 +03:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
#include "nsIWebBrowserPersistDocument.h"
|
|
|
|
|
|
|
|
class nsIDocumentEncoder;
|
|
|
|
class nsISHEntry;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2020-11-23 19:07:43 +03:00
|
|
|
namespace dom {
|
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
2015-08-06 00:25:39 +03:00
|
|
|
class WebBrowserPersistLocalDocument final
|
|
|
|
: public nsIWebBrowserPersistDocument {
|
|
|
|
public:
|
2019-01-02 16:05:23 +03:00
|
|
|
explicit WebBrowserPersistLocalDocument(dom::Document* aDocument);
|
2015-08-06 00:25:39 +03:00
|
|
|
|
2017-06-18 14:37:50 +03:00
|
|
|
NotNull<const Encoding*> GetCharacterSet() const;
|
2015-08-06 00:25:39 +03:00
|
|
|
uint32_t GetPersistFlags() const;
|
2019-07-15 20:22:30 +03:00
|
|
|
nsIURI* GetBaseURI() const;
|
2015-08-06 00:25:39 +03:00
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_NSIWEBBROWSERPERSISTDOCUMENT
|
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS(WebBrowserPersistLocalDocument)
|
|
|
|
|
|
|
|
private:
|
2019-01-02 16:05:23 +03:00
|
|
|
RefPtr<dom::Document> mDocument;
|
2015-08-06 00:25:39 +03:00
|
|
|
uint32_t mPersistFlags;
|
|
|
|
|
|
|
|
void DecideContentType(nsACString& aContentType);
|
|
|
|
nsresult GetDocEncoder(const nsACString& aContentType, uint32_t aEncoderFlags,
|
|
|
|
nsIDocumentEncoder** aEncoder);
|
|
|
|
|
|
|
|
virtual ~WebBrowserPersistLocalDocument();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // WebBrowserPersistLocalDocument_h__
|