Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1337)

Unified Diff: Source/core/loader/cache/CachedDocument.h

Issue 15556002: Refactoring: Generalize CachedSVGDocument for non-SVG use. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Resolved the conflict. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/loader/cache/CachedDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/cache/CachedDocument.h
diff --git a/Source/core/loader/cache/CachedSVGDocument.h b/Source/core/loader/cache/CachedDocument.h
similarity index 73%
rename from Source/core/loader/cache/CachedSVGDocument.h
rename to Source/core/loader/cache/CachedDocument.h
index e689ab192957bcc521deaa3ba14c7dfbc7be8ea0..72e5f19a34518107fabef410e6d317a6e049c15b 100644
--- a/Source/core/loader/cache/CachedSVGDocument.h
+++ b/Source/core/loader/cache/CachedDocument.h
@@ -20,23 +20,24 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef CachedSVGDocument_h
-#define CachedSVGDocument_h
+#ifndef CachedDocument_h
+#define CachedDocument_h
#include "core/loader/TextResourceDecoder.h"
#include "core/loader/cache/CachedResource.h"
#include "core/loader/cache/CachedResourceClient.h"
#include "core/loader/cache/CachedResourceHandle.h"
-#include "core/svg/SVGDocument.h"
namespace WebCore {
-class CachedSVGDocument : public CachedResource {
+class Document;
+
+class CachedDocument : public CachedResource {
public:
- explicit CachedSVGDocument(const ResourceRequest&);
- virtual ~CachedSVGDocument();
+ CachedDocument(const ResourceRequest&, Type);
+ virtual ~CachedDocument();
- SVGDocument* document() const { return m_document.get(); }
+ Document* document() const { return m_document.get(); }
virtual void setEncoding(const String&);
virtual String encoding() const;
@@ -44,18 +45,20 @@ public:
virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE;
-protected:
- RefPtr<SVGDocument> m_document;
+private:
+ PassRefPtr<Document> createDocument(const KURL&);
+
+ RefPtr<Document> m_document;
RefPtr<TextResourceDecoder> m_decoder;
};
-class CachedSVGDocumentClient : public CachedResourceClient {
+class CachedDocumentClient : public CachedResourceClient {
public:
- virtual ~CachedSVGDocumentClient() { }
- static CachedResourceClientType expectedType() { return SVGDocumentType; }
+ virtual ~CachedDocumentClient() { }
+ static CachedResourceClientType expectedType() { return DocumentType; }
virtual CachedResourceClientType resourceClientType() const { return expectedType(); }
};
}
-#endif // CachedSVGDocument_h
+#endif // CachedDocument_h
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/loader/cache/CachedDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698