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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h

Issue 2172613002: Renderer-side changes for NoState Prefetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests Created 4 years, 4 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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 class HTMLParserScheduler; 63 class HTMLParserScheduler;
64 class HTMLResourcePreloader; 64 class HTMLResourcePreloader;
65 class HTMLScriptRunner; 65 class HTMLScriptRunner;
66 class HTMLTreeBuilder; 66 class HTMLTreeBuilder;
67 class PumpSession; 67 class PumpSession;
68 class TokenizedChunkQueue; 68 class TokenizedChunkQueue;
69 69
70 class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptR unnerHost { 70 class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptR unnerHost {
71 USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser); 71 USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser);
72 public: 72 public:
73 static HTMLDocumentParser* create(HTMLDocument& document, ParserSynchronizat ionPolicy backgroundParsingPolicy) 73 static HTMLDocumentParser* create(HTMLDocument&, ParserSynchronizationPolicy );
74 {
75 return new HTMLDocumentParser(document, backgroundParsingPolicy);
76 }
77 ~HTMLDocumentParser() override; 74 ~HTMLDocumentParser() override;
78 DECLARE_VIRTUAL_TRACE(); 75 DECLARE_VIRTUAL_TRACE();
79 76
80 // Exposed for HTMLParserScheduler 77 // Exposed for HTMLParserScheduler
81 void resumeParsingAfterYield(); 78 void resumeParsingAfterYield();
82 79
83 static void parseDocumentFragment(const String&, DocumentFragment*, Element* contextElement, ParserContentPolicy = AllowScriptingContent); 80 static void parseDocumentFragment(const String&, DocumentFragment*, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
84 81
82 // Exposed for testing.
Charlie Harrison 2016/08/03 14:40:03 Append "ForTesting" to the end of methods that sho
83 static bool threadingAllowedForDocument(HTMLDocument&);
84 HTMLScriptRunnerHost* asHTMLScriptRunnerHost() { return this; }
85
85 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } 86 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); }
86 87
87 TextPosition textPosition() const final; 88 TextPosition textPosition() const final;
88 bool isParsingAtLineNumber() const final; 89 bool isParsingAtLineNumber() const final;
89 OrdinalNumber lineNumber() const final; 90 OrdinalNumber lineNumber() const final;
90 91
91 void suspendScheduledTasks() final; 92 void suspendScheduledTasks() final;
92 void resumeScheduledTasks() final; 93 void resumeScheduledTasks() final;
93 94
94 struct TokenizedChunk { 95 struct TokenizedChunk {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 bool m_tasksWereSuspended; 233 bool m_tasksWereSuspended;
233 unsigned m_pumpSessionNestingLevel; 234 unsigned m_pumpSessionNestingLevel;
234 unsigned m_pumpSpeculationsSessionNestingLevel; 235 unsigned m_pumpSpeculationsSessionNestingLevel;
235 bool m_isParsingAtLineNumber; 236 bool m_isParsingAtLineNumber;
236 bool m_triedLoadingLinkHeaders; 237 bool m_triedLoadingLinkHeaders;
237 }; 238 };
238 239
239 } // namespace blink 240 } // namespace blink
240 241
241 #endif 242 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698