fune/dom/webbrowserpersist/WebBrowserPersistLocalDocument.h
Anny Gakhokidze 8123ec0460 Bug 1536468 - Make retrieval of WebBrowserPersistDocumentAttrs.cacheKey async in SessionHistory, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D24472

--HG--
extra : rebase_source : bf5ac32a5e89ec16c07d55d631e40014f729e75f
extra : source : b1bb781543ed7c2ad8dcc3e3146d7e3f4973195d
2019-03-21 16:33:51 -04:00

48 lines
1.4 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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__
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/dom/Document.h"
#include "nsIURI.h"
#include "nsIWebBrowserPersistDocument.h"
class nsIDocumentEncoder;
class nsISHEntry;
namespace mozilla {
class WebBrowserPersistLocalDocument final
: public nsIWebBrowserPersistDocument {
public:
explicit WebBrowserPersistLocalDocument(dom::Document* aDocument);
NotNull<const Encoding*> GetCharacterSet() const;
uint32_t GetPersistFlags() const;
nsIURI* GetBaseURI() const;
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIWEBBROWSERPERSISTDOCUMENT
NS_DECL_CYCLE_COLLECTION_CLASS(WebBrowserPersistLocalDocument)
private:
RefPtr<dom::Document> mDocument;
uint32_t mPersistFlags;
void DecideContentType(nsACString& aContentType);
nsresult GetDocEncoder(const nsACString& aContentType, uint32_t aEncoderFlags,
nsIDocumentEncoder** aEncoder);
virtual ~WebBrowserPersistLocalDocument();
};
} // namespace mozilla
#endif // WebBrowserPersistLocalDocument_h__