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

Side by Side Diff: sky/engine/core/dom/DocumentParser.h

Issue 712423002: Simplify some parsing-related code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2005, 2006 Apple Computer, Inc. 3 * Copyright (C) 2005, 2006 Apple Computer, Inc.
4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
5 * Copyright (C) 2010 Google, Inc. 5 * Copyright (C) 2010 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 21 matching lines...) Expand all
32 namespace blink { 32 namespace blink {
33 33
34 class Document; 34 class Document;
35 class SegmentedString; 35 class SegmentedString;
36 class HTMLDocumentParser; 36 class HTMLDocumentParser;
37 class TextResourceDecoder; 37 class TextResourceDecoder;
38 38
39 class DocumentParser : public RefCounted<DocumentParser> { 39 class DocumentParser : public RefCounted<DocumentParser> {
40 public: 40 public:
41 virtual ~DocumentParser(); 41 virtual ~DocumentParser();
42 virtual void trace(Visitor*);
43 42
44 virtual HTMLDocumentParser* asHTMLDocumentParser() { return 0; } 43 virtual HTMLDocumentParser* asHTMLDocumentParser() { return 0; }
45 44
46 virtual void parse(mojo::ScopedDataPipeConsumerHandle) = 0; 45 virtual void parse(mojo::ScopedDataPipeConsumerHandle) = 0;
47 virtual bool processingData() const { return false; } 46 virtual bool processingData() const { return false; }
48 47
49 // document() will return 0 after detach() is called. 48 // document() will return 0 after detach() is called.
50 Document* document() const { ASSERT(m_document); return m_document; } 49 Document* document() const { ASSERT(m_document); return m_document; }
51 50
52 bool isParsing() const { return m_state == ParsingState; } 51 bool isParsing() const { return m_state == ParsingState; }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ParserState m_state; 84 ParserState m_state;
86 85
87 // Every DocumentParser needs a pointer back to the document. 86 // Every DocumentParser needs a pointer back to the document.
88 // m_document will be 0 after the parser is stopped. 87 // m_document will be 0 after the parser is stopped.
89 Document* m_document; 88 Document* m_document;
90 }; 89 };
91 90
92 } // namespace blink 91 } // namespace blink
93 92
94 #endif // DocumentParser_h 93 #endif // DocumentParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698