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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentParser.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 months 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 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
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>
32 33
33 namespace blink { 34 namespace blink {
34 35
35 DocumentParser::DocumentParser(Document* document) 36 DocumentParser::DocumentParser(Document* document)
36 : m_state(ParsingState) 37 : m_state(ParsingState)
37 , m_documentWasLoadedAsPartOfNavigation(false) 38 , m_documentWasLoadedAsPartOfNavigation(false)
38 , m_document(document) 39 , m_document(document)
39 { 40 {
40 DCHECK(document); 41 DCHECK(document);
41 } 42 }
42 43
43 DocumentParser::~DocumentParser() 44 DocumentParser::~DocumentParser()
44 { 45 {
45 } 46 }
46 47
47 DEFINE_TRACE(DocumentParser) 48 DEFINE_TRACE(DocumentParser)
48 { 49 {
49 visitor->trace(m_document); 50 visitor->trace(m_document);
50 visitor->trace(m_clients); 51 visitor->trace(m_clients);
51 } 52 }
52 53
53 void DocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder>) 54 void DocumentParser::setDecoder(std::unique_ptr<TextResourceDecoder>)
54 { 55 {
55 ASSERT_NOT_REACHED(); 56 ASSERT_NOT_REACHED();
56 } 57 }
57 58
58 TextResourceDecoder* DocumentParser::decoder() 59 TextResourceDecoder* DocumentParser::decoder()
59 { 60 {
60 return nullptr; 61 return nullptr;
61 } 62 }
62 63
63 void DocumentParser::prepareToStopParsing() 64 void DocumentParser::prepareToStopParsing()
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 { 101 {
101 m_clients.add(client); 102 m_clients.add(client);
102 } 103 }
103 104
104 void DocumentParser::removeClient(DocumentParserClient* client) 105 void DocumentParser::removeClient(DocumentParserClient* client)
105 { 106 {
106 m_clients.remove(client); 107 m_clients.remove(client);
107 } 108 }
108 109
109 } // namespace blink 110 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698