| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // HTMLDocumentParser to dispatch preloads. | 97 // HTMLDocumentParser to dispatch preloads. |
| 98 virtual void documentElementAvailable() {} | 98 virtual void documentElementAvailable() {} |
| 99 | 99 |
| 100 void setDocumentWasLoadedAsPartOfNavigation() { | 100 void setDocumentWasLoadedAsPartOfNavigation() { |
| 101 m_documentWasLoadedAsPartOfNavigation = true; | 101 m_documentWasLoadedAsPartOfNavigation = true; |
| 102 } | 102 } |
| 103 bool documentWasLoadedAsPartOfNavigation() const { | 103 bool documentWasLoadedAsPartOfNavigation() const { |
| 104 return m_documentWasLoadedAsPartOfNavigation; | 104 return m_documentWasLoadedAsPartOfNavigation; |
| 105 } | 105 } |
| 106 | 106 |
| 107 // FIXME: The names are not very accurate :( | |
| 108 virtual void suspendScheduledTasks(); | |
| 109 virtual void resumeScheduledTasks(); | |
| 110 | |
| 111 void addClient(DocumentParserClient*); | 107 void addClient(DocumentParserClient*); |
| 112 void removeClient(DocumentParserClient*); | 108 void removeClient(DocumentParserClient*); |
| 113 | 109 |
| 114 protected: | 110 protected: |
| 115 explicit DocumentParser(Document*); | 111 explicit DocumentParser(Document*); |
| 116 | 112 |
| 117 private: | 113 private: |
| 118 enum ParserState { ParsingState, StoppingState, StoppedState, DetachedState }; | 114 enum ParserState { ParsingState, StoppingState, StoppedState, DetachedState }; |
| 119 ParserState m_state; | 115 ParserState m_state; |
| 120 bool m_documentWasLoadedAsPartOfNavigation; | 116 bool m_documentWasLoadedAsPartOfNavigation; |
| 121 | 117 |
| 122 // Every DocumentParser needs a pointer back to the document. | 118 // Every DocumentParser needs a pointer back to the document. |
| 123 // m_document will be 0 after the parser is stopped. | 119 // m_document will be 0 after the parser is stopped. |
| 124 Member<Document> m_document; | 120 Member<Document> m_document; |
| 125 | 121 |
| 126 HeapHashSet<WeakMember<DocumentParserClient>> m_clients; | 122 HeapHashSet<WeakMember<DocumentParserClient>> m_clients; |
| 127 }; | 123 }; |
| 128 | 124 |
| 129 } // namespace blink | 125 } // namespace blink |
| 130 | 126 |
| 131 #endif // DocumentParser_h | 127 #endif // DocumentParser_h |
| OLD | NEW |