| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> | |
| 3 Copyright (C) 2011 Cosmin Truta <ctruta@gmail.com> | |
| 4 Copyright (C) 2012 University of Szeged | |
| 5 Copyright (C) 2012 Renata Hodovan <reni@webkit.org> | |
| 6 | |
| 7 This library is free software; you can redistribute it and/or | |
| 8 modify it under the terms of the GNU Library General Public | |
| 9 License as published by the Free Software Foundation; either | |
| 10 version 2 of the License, or (at your option) any later version. | |
| 11 | |
| 12 This library is distributed in the hope that it will be useful, | |
| 13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 15 Library General Public License for more details. | |
| 16 | |
| 17 You should have received a copy of the GNU Library General Public License | |
| 18 along with this library; see the file COPYING.LIB. If not, write to | |
| 19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
| 20 Boston, MA 02110-1301, USA. | |
| 21 */ | |
| 22 | |
| 23 #ifndef CachedSVGDocument_h | |
| 24 #define CachedSVGDocument_h | |
| 25 | |
| 26 #include "core/loader/TextResourceDecoder.h" | |
| 27 #include "core/loader/cache/CachedResource.h" | |
| 28 #include "core/loader/cache/CachedResourceClient.h" | |
| 29 #include "core/loader/cache/CachedResourceHandle.h" | |
| 30 #include "core/svg/SVGDocument.h" | |
| 31 | |
| 32 namespace WebCore { | |
| 33 | |
| 34 class CachedSVGDocument : public CachedResource { | |
| 35 public: | |
| 36 explicit CachedSVGDocument(const ResourceRequest&); | |
| 37 virtual ~CachedSVGDocument(); | |
| 38 | |
| 39 SVGDocument* document() const { return m_document.get(); } | |
| 40 | |
| 41 virtual void setEncoding(const String&); | |
| 42 virtual String encoding() const; | |
| 43 virtual void checkNotify() OVERRIDE; | |
| 44 | |
| 45 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | |
| 46 | |
| 47 protected: | |
| 48 RefPtr<SVGDocument> m_document; | |
| 49 RefPtr<TextResourceDecoder> m_decoder; | |
| 50 }; | |
| 51 | |
| 52 class CachedSVGDocumentClient : public CachedResourceClient { | |
| 53 public: | |
| 54 virtual ~CachedSVGDocumentClient() { } | |
| 55 static CachedResourceClientType expectedType() { return SVGDocumentType; } | |
| 56 virtual CachedResourceClientType resourceClientType() const { return expecte
dType(); } | |
| 57 }; | |
| 58 | |
| 59 } | |
| 60 | |
| 61 #endif // CachedSVGDocument_h | |
| OLD | NEW |