| OLD | NEW |
| 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 Loading... |
| 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; | |
| 81 RefPtr<DocumentParser> m_parser; | 82 RefPtr<DocumentParser> m_parser; |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace WebCore | 85 } // namespace WebCore |
| 85 | 86 |
| 86 #endif // DocumentWriter_h | 87 #endif // DocumentWriter_h |
| OLD | NEW |