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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentParser.h

Issue 2042413002: Notify the HTMLDocumentParser on document element available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: insertedByParser after actual insertion point Created 4 years, 6 months 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 virtual void stopParsing(); 79 virtual void stopParsing();
80 80
81 // Document is expected to detach the parser before releasing its ref. 81 // Document is expected to detach the parser before releasing its ref.
82 // After detach, m_document is cleared. The parser will unwind its 82 // After detach, m_document is cleared. The parser will unwind its
83 // callstacks, but not produce any more nodes. 83 // callstacks, but not produce any more nodes.
84 // It is impossible for the parser to touch the rest of WebCore after 84 // It is impossible for the parser to touch the rest of WebCore after
85 // detach is called. 85 // detach is called.
86 // Oilpan: We don't need to call detach when a Document is destructed. 86 // Oilpan: We don't need to call detach when a Document is destructed.
87 virtual void detach(); 87 virtual void detach();
88 88
89 // Notifies the parser that the document element is available. Used by
90 // HTMLDocumentParser to dispatch preloads.
91 virtual void documentElementAvailable() { }
92
89 void setDocumentWasLoadedAsPartOfNavigation() { m_documentWasLoadedAsPartOfN avigation = true; } 93 void setDocumentWasLoadedAsPartOfNavigation() { m_documentWasLoadedAsPartOfN avigation = true; }
90 bool documentWasLoadedAsPartOfNavigation() const { return m_documentWasLoade dAsPartOfNavigation; } 94 bool documentWasLoadedAsPartOfNavigation() const { return m_documentWasLoade dAsPartOfNavigation; }
91 95
92 // FIXME: The names are not very accurate :( 96 // FIXME: The names are not very accurate :(
93 virtual void suspendScheduledTasks(); 97 virtual void suspendScheduledTasks();
94 virtual void resumeScheduledTasks(); 98 virtual void resumeScheduledTasks();
95 99
96 void addClient(DocumentParserClient*); 100 void addClient(DocumentParserClient*);
97 void removeClient(DocumentParserClient*); 101 void removeClient(DocumentParserClient*);
98 102
(...skipping 13 matching lines...) Expand all
112 // Every DocumentParser needs a pointer back to the document. 116 // Every DocumentParser needs a pointer back to the document.
113 // m_document will be 0 after the parser is stopped. 117 // m_document will be 0 after the parser is stopped.
114 Member<Document> m_document; 118 Member<Document> m_document;
115 119
116 HeapHashSet<WeakMember<DocumentParserClient>> m_clients; 120 HeapHashSet<WeakMember<DocumentParserClient>> m_clients;
117 }; 121 };
118 122
119 } // namespace blink 123 } // namespace blink
120 124
121 #endif // DocumentParser_h 125 #endif // DocumentParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698