summaryrefslogtreecommitdiff
path: root/Source/WebCore/loader/cache/CachedXSLStyleSheet.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/loader/cache/CachedXSLStyleSheet.h')
-rw-r--r--Source/WebCore/loader/cache/CachedXSLStyleSheet.h50
1 files changed, 23 insertions, 27 deletions
diff --git a/Source/WebCore/loader/cache/CachedXSLStyleSheet.h b/Source/WebCore/loader/cache/CachedXSLStyleSheet.h
index 307bda691..3ef0f600e 100644
--- a/Source/WebCore/loader/cache/CachedXSLStyleSheet.h
+++ b/Source/WebCore/loader/cache/CachedXSLStyleSheet.h
@@ -23,42 +23,38 @@
pages from the web. It has a memory cache for these objects.
*/
-#ifndef CachedXSLStyleSheet_h
-#define CachedXSLStyleSheet_h
+#pragma once
+
+#if ENABLE(XSLT)
#include "CachedResource.h"
-#include <wtf/Vector.h>
namespace WebCore {
- class CachedResourceLoader;
- class TextResourceDecoder;
-
-#if ENABLE(XSLT)
- class CachedXSLStyleSheet final : public CachedResource {
- public:
- CachedXSLStyleSheet(const ResourceRequest&);
-
- const String& sheet() const { return m_sheet; }
-
- protected:
- virtual void checkNotify() override;
+class TextResourceDecoder;
- String m_sheet;
- RefPtr<TextResourceDecoder> m_decoder;
+class CachedXSLStyleSheet final : public CachedResource {
+public:
+ CachedXSLStyleSheet(CachedResourceRequest&&, SessionID);
+ virtual ~CachedXSLStyleSheet();
- private:
- virtual bool mayTryReplaceEncodedData() const override { return true; }
+ const String& sheet() const { return m_sheet; }
- virtual void didAddClient(CachedResourceClient*) override;
+private:
+ void checkNotify() final;
+ bool mayTryReplaceEncodedData() const final { return true; }
+ void didAddClient(CachedResourceClient&) final;
+ void setEncoding(const String&) final;
+ String encoding() const final;
+ const TextResourceDecoder* textResourceDecoder() const final { return m_decoder.get(); }
+ void finishLoading(SharedBuffer*) final;
- virtual void setEncoding(const String&) override;
- virtual String encoding() const override;
- virtual void finishLoading(ResourceBuffer*) override;
- };
+ String m_sheet;
+ RefPtr<TextResourceDecoder> m_decoder;
+};
-#endif
+} // namespace WebCore
-}
+SPECIALIZE_TYPE_TRAITS_CACHED_RESOURCE(CachedXSLStyleSheet, CachedResource::XSLStyleSheet)
-#endif
+#endif // ENABLE(XSLT)