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

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

Issue 69823002: Move ownership of the TextResourceDecoder to DecodedDataDocumentParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes 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/DocumentEncodingData.h ('k') | Source/core/dom/DocumentParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentParser.h
diff --git a/Source/core/dom/DocumentParser.h b/Source/core/dom/DocumentParser.h
index 3b3969b21c1e6780be2d31a79198cd45a49c6f3c..1b0e91f8a52579d5f2d2cb2d7c393b79334941eb 100644
--- a/Source/core/dom/DocumentParser.h
+++ b/Source/core/dom/DocumentParser.h
@@ -26,6 +26,7 @@
#include "wtf/Forward.h"
#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -33,6 +34,7 @@ class Document;
class DocumentWriter;
class SegmentedString;
class ScriptableDocumentParser;
+class TextResourceDecoder;
class DocumentParser : public RefCounted<DocumentParser> {
public:
@@ -46,10 +48,12 @@ public:
// insert is used by document.write.
virtual void insert(const SegmentedString&) = 0;
- // appendBytes and flush are used by DocumentWriter (the loader).
+ // The below functions are used by DocumentWriter (the loader).
virtual size_t appendBytes(const char* bytes, size_t length) = 0;
virtual size_t flush() = 0;
virtual bool needsDecoder() const { return false; }
+ virtual void setDecoder(PassRefPtr<TextResourceDecoder>);
+ virtual PassRefPtr<TextResourceDecoder> decoder();
// pinToMainThread also makes append() not yield before completion of that chunk.
virtual void pinToMainThread() { }
« no previous file with comments | « Source/core/dom/DocumentEncodingData.h ('k') | Source/core/dom/DocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698