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

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

Issue 811873003: Move Sky's DataPipeDrainer to mojo/common (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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) 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 , m_weakFactory(this) 69 , m_weakFactory(this)
70 { 70 {
71 } 71 }
72 72
73 BackgroundHTMLParser::~BackgroundHTMLParser() 73 BackgroundHTMLParser::~BackgroundHTMLParser()
74 { 74 {
75 } 75 }
76 76
77 void BackgroundHTMLParser::start() 77 void BackgroundHTMLParser::start()
78 { 78 {
79 m_drainer = adoptPtr(new DataPipeDrainer(this, m_source.Pass())); 79 m_drainer = adoptPtr(new mojo::common::DataPipeDrainer(this, m_source.Pass() ));
80 } 80 }
81 81
82 void BackgroundHTMLParser::stop() 82 void BackgroundHTMLParser::stop()
83 { 83 {
84 delete this; 84 delete this;
85 } 85 }
86 86
87 void BackgroundHTMLParser::OnDataAvailable(const void* data, size_t numberOfByte s) 87 void BackgroundHTMLParser::OnDataAvailable(const void* data, size_t numberOfByte s)
88 { 88 {
89 ASSERT(!m_input.isClosed()); 89 ASSERT(!m_input.isClosed());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 OwnPtr<HTMLDocumentParser::ParsedChunk> chunk = adoptPtr(new HTMLDocumentPar ser::ParsedChunk); 156 OwnPtr<HTMLDocumentParser::ParsedChunk> chunk = adoptPtr(new HTMLDocumentPar ser::ParsedChunk);
157 chunk->tokens = m_pendingTokens.release(); 157 chunk->tokens = m_pendingTokens.release();
158 Platform::current()->mainThreadTaskRunner()->PostTask(FROM_HERE, 158 Platform::current()->mainThreadTaskRunner()->PostTask(FROM_HERE,
159 base::Bind(&HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParse r, m_parser, chunk.release())); 159 base::Bind(&HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParse r, m_parser, chunk.release()));
160 160
161 m_pendingTokens = adoptPtr(new CompactHTMLTokenStream); 161 m_pendingTokens = adoptPtr(new CompactHTMLTokenStream);
162 } 162 }
163 163
164 } 164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698