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

Unified Diff: Source/core/dom/Document.h

Issue 23455024: Move ownership of the TextResourceDecoder to DecodedDataDocumentParser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 1 month 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/dom/DecodedDataDocumentParser.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 06d421bd3c1035f3608a0d6c6ed6a5271e38257a..4b9fcf44203f7c0e75064706de61bac6f1d3786e 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -152,7 +152,6 @@ class StyleSheetContents;
class StyleSheetList;
class Text;
class TextAutosizer;
-class TextResourceDecoder;
class Touch;
class TouchList;
class TransformSource;
@@ -840,11 +839,19 @@ public:
void finishedParsing();
- void setDecoder(PassRefPtr<TextResourceDecoder>);
- TextResourceDecoder* decoder() const { return m_decoder.get(); }
+ struct DocumentEncodingData {
+ DocumentEncodingData();
- void setEncoding(const WTF::TextEncoding&);
- const WTF::TextEncoding& encoding() const { return m_encoding; }
+ WTF::TextEncoding encoding;
+ bool wasDetectedHeuristically;
+ bool sawDecodingError;
+ };
+
+ void setEncoding(DocumentEncodingData);
+ const WTF::TextEncoding& encoding() const { return m_encodingData.encoding; }
+
+ bool encodingWasDetectedHeuristically() const { return m_encodingData.wasDetectedHeuristically; }
+ bool sawDecodingError() const { return m_encodingData.sawDecodingError; }
void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; }
bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; }
@@ -1229,8 +1236,7 @@ private:
String m_contentLanguage;
- RefPtr<TextResourceDecoder> m_decoder;
- WTF::TextEncoding m_encoding;
+ DocumentEncodingData m_encodingData;
InheritedBool m_designMode;
« no previous file with comments | « Source/core/dom/DecodedDataDocumentParser.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698