CachedSVGDocument.h [plain text]
#ifndef CachedSVGDocument_h
#define CachedSVGDocument_h
#if ENABLE(SVG)
#include "CachedResource.h"
#include "CachedResourceClient.h"
#include "CachedResourceHandle.h"
#include "SVGDocument.h"
#include "TextResourceDecoder.h"
namespace WebCore {
class CachedSVGDocument : public CachedResource {
public:
explicit CachedSVGDocument(const ResourceRequest&);
virtual ~CachedSVGDocument();
SVGDocument* document() const { return m_document.get(); }
virtual void setEncoding(const String&);
virtual String encoding() const;
virtual void data(PassRefPtr<SharedBuffer> data, bool allDataReceived);
protected:
RefPtr<SVGDocument> m_document;
RefPtr<TextResourceDecoder> m_decoder;
};
class CachedSVGDocumentClient : public CachedResourceClient {
public:
virtual ~CachedSVGDocumentClient() { }
static CachedResourceClientType expectedType() { return SVGDocumentType; }
virtual CachedResourceClientType resourceClientType() { return expectedType(); }
};
}
#endif
#endif // CachedSVGDocument_h