OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "core/dom/DocumentParser.h" | 26 #include "core/dom/DocumentParser.h" |
27 | 27 |
28 #include "core/dom/Document.h" | 28 #include "core/dom/Document.h" |
29 #include "core/dom/DocumentParserClient.h" | 29 #include "core/dom/DocumentParserClient.h" |
30 #include "core/html/parser/TextResourceDecoder.h" | 30 #include "core/html/parser/TextResourceDecoder.h" |
31 #include "wtf/Assertions.h" | 31 #include "wtf/Assertions.h" |
32 #include <memory> | |
33 | 32 |
34 namespace blink { | 33 namespace blink { |
35 | 34 |
36 DocumentParser::DocumentParser(Document* document) | 35 DocumentParser::DocumentParser(Document* document) |
37 : m_state(ParsingState) | 36 : m_state(ParsingState) |
38 , m_documentWasLoadedAsPartOfNavigation(false) | 37 , m_documentWasLoadedAsPartOfNavigation(false) |
39 , m_document(document) | 38 , m_document(document) |
40 { | 39 { |
41 DCHECK(document); | 40 DCHECK(document); |
42 } | 41 } |
43 | 42 |
44 DocumentParser::~DocumentParser() | 43 DocumentParser::~DocumentParser() |
45 { | 44 { |
46 } | 45 } |
47 | 46 |
48 DEFINE_TRACE(DocumentParser) | 47 DEFINE_TRACE(DocumentParser) |
49 { | 48 { |
50 visitor->trace(m_document); | 49 visitor->trace(m_document); |
51 visitor->trace(m_clients); | 50 visitor->trace(m_clients); |
52 } | 51 } |
53 | 52 |
54 void DocumentParser::setDecoder(std::unique_ptr<TextResourceDecoder>) | 53 void DocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder>) |
55 { | 54 { |
56 ASSERT_NOT_REACHED(); | 55 ASSERT_NOT_REACHED(); |
57 } | 56 } |
58 | 57 |
59 TextResourceDecoder* DocumentParser::decoder() | 58 TextResourceDecoder* DocumentParser::decoder() |
60 { | 59 { |
61 return nullptr; | 60 return nullptr; |
62 } | 61 } |
63 | 62 |
64 void DocumentParser::prepareToStopParsing() | 63 void DocumentParser::prepareToStopParsing() |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 { | 100 { |
102 m_clients.add(client); | 101 m_clients.add(client); |
103 } | 102 } |
104 | 103 |
105 void DocumentParser::removeClient(DocumentParserClient* client) | 104 void DocumentParser::removeClient(DocumentParserClient* client) |
106 { | 105 { |
107 m_clients.remove(client); | 106 m_clients.remove(client); |
108 } | 107 } |
109 | 108 |
110 } // namespace blink | 109 } // namespace blink |
OLD | NEW |