Chromium Code Reviews| Index: Source/core/fetch/TextResourceDecoder.h |
| diff --git a/Source/core/fetch/TextResourceDecoder.h b/Source/core/fetch/TextResourceDecoder.h |
| index 4c7734781487fe8e1f3cdd0cc5ec5cc53a8b076d..a485ea185f1ba8260c884190a0a7dc03a620febe 100644 |
| --- a/Source/core/fetch/TextResourceDecoder.h |
| +++ b/Source/core/fetch/TextResourceDecoder.h |
| @@ -28,6 +28,7 @@ |
| namespace WebCore { |
| +struct DocumentEncodingData; |
| class HTMLMetaCharsetParser; |
| class TextResourceDecoder { |
| @@ -52,11 +53,6 @@ public: |
| void setEncoding(const WTF::TextEncoding&, EncodingSource); |
| const WTF::TextEncoding& encoding() const { return m_encoding; } |
| - bool encodingWasDetectedHeuristically() const |
| - { |
| - return m_source == AutoDetectedEncoding |
| - || m_source == EncodingFromContentSniffing; |
| - } |
| String decode(const char* data, size_t length); |
| String flush(); |
| @@ -68,6 +64,7 @@ public: |
| void useLenientXMLDecoding() { m_useLenientXMLDecoding = true; } |
| bool sawError() const { return m_sawError; } |
| + void getEncodingData(DocumentEncodingData&) const; |
|
eseidel
2013/11/18 22:32:07
"get" methods are uncommon in Blink. Is there a r
oystein (OOO til 10th of July)
2013/11/18 22:36:46
It's copyable, it'd just add the need for the full
|
| private: |
| TextResourceDecoder(const String& mimeType, const WTF::TextEncoding& defaultEncoding, bool usesEncodingDetector); |
| @@ -83,6 +80,13 @@ private: |
| void detectJapaneseEncoding(const char*, size_t); |
| bool shouldAutoDetect() const; |
| + bool encodingWasDetectedHeuristically() const |
| + { |
| + return m_source == AutoDetectedEncoding |
| + || m_source == EncodingFromContentSniffing; |
| + } |
| + |
| + |
| ContentType m_contentType; |
| WTF::TextEncoding m_encoding; |
| OwnPtr<TextCodec> m_codec; |