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

Side by Side Diff: Source/core/loader/DocumentWriter.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/DocumentLoader.cpp ('k') | Source/core/loader/DocumentWriter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010. Adam Barth. All rights reserved. 2 * Copyright (C) 2010. Adam Barth. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 const String& mimeType() const { return m_decoderBuilder.mimeType(); } 60 const String& mimeType() const { return m_decoderBuilder.mimeType(); }
61 const String& encoding() const { return m_decoderBuilder.encoding(); } 61 const String& encoding() const { return m_decoderBuilder.encoding(); }
62 bool encodingWasChosenByUser() const { return m_decoderBuilder.encodingWasCh osenByUser(); } 62 bool encodingWasChosenByUser() const { return m_decoderBuilder.encodingWasCh osenByUser(); }
63 63
64 // Exposed for DocumentParser::appendBytes. 64 // Exposed for DocumentParser::appendBytes.
65 void reportDataReceived(); 65 void reportDataReceived();
66 // Exposed for DocumentLoader::replaceDocument. 66 // Exposed for DocumentLoader::replaceDocument.
67 void appendReplacingData(const String&); 67 void appendReplacingData(const String&);
68 68
69 void setUserChosenEncoding(const String& charset);
70
69 void setDocumentWasLoadedAsPartOfNavigation(); 71 void setDocumentWasLoadedAsPartOfNavigation();
70 72
71 private: 73 private:
72 DocumentWriter(Document*, const String& mimeType, const String& encoding, bo ol encodingUserChoosen); 74 DocumentWriter(Document*, const String& mimeType, const String& encoding, bo ol encodingUserChoosen);
73 75
74 PassRefPtr<Document> createDocument(const KURL&); 76 PassRefPtr<Document> createDocument(const KURL&);
75 77
76 Document* m_document; 78 Document* m_document;
77 bool m_hasReceivedSomeData; 79 bool m_hasReceivedSomeData;
78 TextResourceDecoderBuilder m_decoderBuilder; 80 TextResourceDecoderBuilder m_decoderBuilder;
79 81
80 RefPtr<TextResourceDecoder> m_decoder; 82 RefPtr<TextResourceDecoder> m_decoder;
81 RefPtr<DocumentParser> m_parser; 83 RefPtr<DocumentParser> m_parser;
82 }; 84 };
83 85
84 } // namespace WebCore 86 } // namespace WebCore
85 87
86 #endif // DocumentWriter_h 88 #endif // DocumentWriter_h
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.cpp ('k') | Source/core/loader/DocumentWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698