| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 virtual void setDecoder(PassOwnPtr<TextResourceDecoder>); | 55 virtual void setDecoder(PassOwnPtr<TextResourceDecoder>); |
| 56 virtual TextResourceDecoder* decoder(); | 56 virtual TextResourceDecoder* decoder(); |
| 57 virtual void setHasAppendedData() { } | 57 virtual void setHasAppendedData() { } |
| 58 | 58 |
| 59 // FIXME: append() should be private, but DocumentLoader and DOMPatchSupport
uses it for now. | 59 // FIXME: append() should be private, but DocumentLoader and DOMPatchSupport
uses it for now. |
| 60 virtual void append(const String&) = 0; | 60 virtual void append(const String&) = 0; |
| 61 | 61 |
| 62 virtual void finish() = 0; | 62 virtual void finish() = 0; |
| 63 | 63 |
| 64 // document() will return 0 after detach() is called. | 64 // document() will return 0 after detach() is called. |
| 65 Document* document() const { ASSERT(m_document); return m_document; } | 65 Document* document() const { DCHECK(m_document); return m_document; } |
| 66 | 66 |
| 67 bool isParsing() const { return m_state == ParsingState; } | 67 bool isParsing() const { return m_state == ParsingState; } |
| 68 bool isStopping() const { return m_state == StoppingState; } | 68 bool isStopping() const { return m_state == StoppingState; } |
| 69 bool isStopped() const { return m_state >= StoppedState; } | 69 bool isStopped() const { return m_state >= StoppedState; } |
| 70 bool isDetached() const { return m_state == DetachedState; } | 70 bool isDetached() const { return m_state == DetachedState; } |
| 71 | 71 |
| 72 // prepareToStop() is used when the EOF token is encountered and parsing is
to be | 72 // prepareToStop() is used when the EOF token is encountered and parsing is
to be |
| 73 // stopped normally. | 73 // stopped normally. |
| 74 virtual void prepareToStopParsing(); | 74 virtual void prepareToStopParsing(); |
| 75 | 75 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Every DocumentParser needs a pointer back to the document. | 113 // Every DocumentParser needs a pointer back to the document. |
| 114 // m_document will be 0 after the parser is stopped. | 114 // m_document will be 0 after the parser is stopped. |
| 115 Member<Document> m_document; | 115 Member<Document> m_document; |
| 116 | 116 |
| 117 HeapHashSet<WeakMember<DocumentParserClient>> m_clients; | 117 HeapHashSet<WeakMember<DocumentParserClient>> m_clients; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace blink | 120 } // namespace blink |
| 121 | 121 |
| 122 #endif // DocumentParser_h | 122 #endif // DocumentParser_h |
| OLD | NEW |