CachedSVGDocument.h [plain text]
#ifndef CachedSVGDocument_h
#define CachedSVGDocument_h
#include "CachedResource.h"
#include "CachedResourceHandle.h"
#include "SVGDocument.h"
#include "TextResourceDecoder.h"
namespace WebCore {
class CachedSVGDocument final : public CachedResource {
public:
explicit CachedSVGDocument(const ResourceRequest&, SessionID);
virtual ~CachedSVGDocument();
SVGDocument* document() const { return m_document.get(); }
private:
bool mayTryReplaceEncodedData() const override { return true; }
void setEncoding(const String&) override;
String encoding() const override;
const TextResourceDecoder* textResourceDecoder() const override { return m_decoder.get(); }
void finishLoading(SharedBuffer*) override;
RefPtr<SVGDocument> m_document;
RefPtr<TextResourceDecoder> m_decoder;
};
}
SPECIALIZE_TYPE_TRAITS_CACHED_RESOURCE(CachedSVGDocument, CachedResource::SVGDocumentResource)
#endif // CachedSVGDocument_h