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

Side by Side Diff: Source/core/loader/DocumentWriter.h

Issue 100563004: Redirect HTML resource bytes directly to parser thread (Blink side CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_decodermove
Patch Set: Missing include Created 7 years 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 ~DocumentWriter(); 50 ~DocumentWriter();
51 51
52 void end(); 52 void end();
53 53
54 // This is only called by ScriptController::executeScriptIfJavaScriptURL 54 // This is only called by ScriptController::executeScriptIfJavaScriptURL
55 // and always contains the result of evaluating a javascript: url. 55 // and always contains the result of evaluating a javascript: url.
56 void replaceDocument(const String&, Document* ownerDocument); 56 void replaceDocument(const String&, Document* ownerDocument);
57 57
58 void addData(const char* bytes, size_t length); 58 void addData(const char* bytes, size_t length);
59 void parserResourceMessageFilterAdded();
59 60
60 const AtomicString& mimeType() const { return m_decoderBuilder.mimeType(); } 61 const AtomicString& mimeType() const { return m_decoderBuilder.mimeType(); }
61 const AtomicString& encoding() const { return m_decoderBuilder.encoding(); } 62 const AtomicString& encoding() const { return m_decoderBuilder.encoding(); }
62 bool encodingWasChosenByUser() const { return m_decoderBuilder.encodingWasCh osenByUser(); } 63 bool encodingWasChosenByUser() const { return m_decoderBuilder.encodingWasCh osenByUser(); }
63 64
64 // Exposed for DocumentLoader::replaceDocument. 65 // Exposed for DocumentLoader::replaceDocument.
65 void appendReplacingData(const String&); 66 void appendReplacingData(const String&);
66 67
67 void setUserChosenEncoding(const String& charset); 68 void setUserChosenEncoding(const String& charset);
68 69
69 void setDocumentWasLoadedAsPartOfNavigation(); 70 void setDocumentWasLoadedAsPartOfNavigation();
70 71
71 private: 72 private:
72 DocumentWriter(Document*, const AtomicString& mimeType, const AtomicString& encoding, bool encodingUserChoosen); 73 DocumentWriter(Document*, const AtomicString& mimeType, const AtomicString& encoding, bool encodingUserChoosen);
73 74
74 PassRefPtr<Document> createDocument(const KURL&); 75 PassRefPtr<Document> createDocument(const KURL&);
75 76
76 Document* m_document; 77 Document* m_document;
77 TextResourceDecoderBuilder m_decoderBuilder; 78 TextResourceDecoderBuilder m_decoderBuilder;
78 79
79 RefPtr<DocumentParser> m_parser; 80 RefPtr<DocumentParser> m_parser;
80 }; 81 };
81 82
82 } // namespace WebCore 83 } // namespace WebCore
83 84
84 #endif // DocumentWriter_h 85 #endif // DocumentWriter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698