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

Side by Side Diff: sky/engine/core/html/parser/BackgroundHTMLParser.cpp

Issue 676133002: Remove HTMLParserOptions (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fixup Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2013 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 base::WeakPtr<BackgroundHTMLParser> BackgroundHTMLParser::create(PassOwnPtr<Back groundHTMLParser::Configuration> config) 52 base::WeakPtr<BackgroundHTMLParser> BackgroundHTMLParser::create(PassOwnPtr<Back groundHTMLParser::Configuration> config)
53 { 53 {
54 // Caller must free by calling stop(). 54 // Caller must free by calling stop().
55 BackgroundHTMLParser* parser = new BackgroundHTMLParser(config); 55 BackgroundHTMLParser* parser = new BackgroundHTMLParser(config);
56 return parser->m_weakFactory.GetWeakPtr(); 56 return parser->m_weakFactory.GetWeakPtr();
57 } 57 }
58 58
59 BackgroundHTMLParser::BackgroundHTMLParser(PassOwnPtr<Configuration> config) 59 BackgroundHTMLParser::BackgroundHTMLParser(PassOwnPtr<Configuration> config)
60 : m_token(adoptPtr(new HTMLToken)) 60 : m_token(adoptPtr(new HTMLToken))
61 , m_tokenizer(HTMLTokenizer::create(config->options)) 61 , m_tokenizer(HTMLTokenizer::create())
62 , m_parser(config->parser) 62 , m_parser(config->parser)
63 , m_pendingTokens(adoptPtr(new CompactHTMLTokenStream)) 63 , m_pendingTokens(adoptPtr(new CompactHTMLTokenStream))
64 , m_decoder(TextResourceDecoder::create()) 64 , m_decoder(TextResourceDecoder::create())
65 , m_source(config->source.Pass()) 65 , m_source(config->source.Pass())
66 , m_weakFactory(this) 66 , m_weakFactory(this)
67 { 67 {
68 } 68 }
69 69
70 BackgroundHTMLParser::~BackgroundHTMLParser() 70 BackgroundHTMLParser::~BackgroundHTMLParser()
71 { 71 {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 #endif 162 #endif
163 163
164 OwnPtr<HTMLDocumentParser::ParsedChunk> chunk = adoptPtr(new HTMLDocumentPar ser::ParsedChunk); 164 OwnPtr<HTMLDocumentParser::ParsedChunk> chunk = adoptPtr(new HTMLDocumentPar ser::ParsedChunk);
165 chunk->tokens = m_pendingTokens.release(); 165 chunk->tokens = m_pendingTokens.release();
166 callOnMainThread(bind(&HTMLDocumentParser::didReceiveParsedChunkFromBackgrou ndParser, m_parser, chunk.release())); 166 callOnMainThread(bind(&HTMLDocumentParser::didReceiveParsedChunkFromBackgrou ndParser, m_parser, chunk.release()));
167 167
168 m_pendingTokens = adoptPtr(new CompactHTMLTokenStream); 168 m_pendingTokens = adoptPtr(new CompactHTMLTokenStream);
169 } 169 }
170 170
171 } 171 }
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/BackgroundHTMLParser.h ('k') | sky/engine/core/html/parser/HTMLDocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698