summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/fetch/TextResource.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/fetch/TextResource.h')
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/TextResource.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/fetch/TextResource.h b/chromium/third_party/WebKit/Source/core/fetch/TextResource.h
new file mode 100644
index 00000000000..1e6f3747775
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/core/fetch/TextResource.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TextResource_h
+#define TextResource_h
+
+#include "core/fetch/ResourcePtr.h"
+
+namespace WebCore {
+
+class ResourceFetcher;
+class TextResourceDecoder;
+
+class TextResource : public Resource {
+public:
+ // Returns the decoded data in text form. The data has to be available at
+ // call time.
+ String decodedText() const;
+
+ virtual void setEncoding(const String&) OVERRIDE;
+ virtual String encoding() const OVERRIDE;
+
+protected:
+ TextResource(const ResourceRequest&, Type, const String& mimeType, const String& charset);
+ virtual ~TextResource();
+
+private:
+ OwnPtr<TextResourceDecoder> m_decoder;
+};
+
+}
+
+#endif // TextResource_h