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

Side by Side Diff: sky/engine/core/html/parser/HTMLDocumentParser.h

Issue 867903002: Remove UseCounter (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/html/imports/HTMLImportsController.cpp ('k') | sky/engine/core/page/Page.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_ 26 #ifndef SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_
27 #define SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_ 27 #define SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_
28 28
29 #include "base/callback.h" 29 #include "base/callback.h"
30 #include "base/memory/weak_ptr.h" 30 #include "base/memory/weak_ptr.h"
31 #include "sky/engine/core/dom/DocumentParser.h" 31 #include "sky/engine/core/dom/DocumentParser.h"
32 #include "sky/engine/core/fetch/ResourceClient.h" 32 #include "sky/engine/core/fetch/ResourceClient.h"
33 #include "sky/engine/core/frame/UseCounter.h"
34 #include "sky/engine/core/html/parser/CompactHTMLToken.h" 33 #include "sky/engine/core/html/parser/CompactHTMLToken.h"
35 #include "sky/engine/core/html/parser/HTMLInputStream.h" 34 #include "sky/engine/core/html/parser/HTMLInputStream.h"
36 #include "sky/engine/core/html/parser/HTMLScriptRunner.h" 35 #include "sky/engine/core/html/parser/HTMLScriptRunner.h"
37 #include "sky/engine/core/html/parser/HTMLToken.h" 36 #include "sky/engine/core/html/parser/HTMLToken.h"
38 #include "sky/engine/core/html/parser/HTMLTokenizer.h" 37 #include "sky/engine/core/html/parser/HTMLTokenizer.h"
39 #include "sky/engine/core/html/parser/TextResourceDecoder.h" 38 #include "sky/engine/core/html/parser/TextResourceDecoder.h"
40 #include "sky/engine/platform/text/SegmentedString.h" 39 #include "sky/engine/platform/text/SegmentedString.h"
41 #include "sky/engine/wtf/Deque.h" 40 #include "sky/engine/wtf/Deque.h"
42 #include "sky/engine/wtf/OwnPtr.h" 41 #include "sky/engine/wtf/OwnPtr.h"
43 #include "sky/engine/wtf/WeakPtr.h" 42 #include "sky/engine/wtf/WeakPtr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); 80 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
82 81
83 // From DocumentParser: 82 // From DocumentParser:
84 void detach() override final; 83 void detach() override final;
85 void prepareToStopParsing() override final; 84 void prepareToStopParsing() override final;
86 void stopParsing() override final; 85 void stopParsing() override final;
87 bool isWaitingForScripts() const override final; 86 bool isWaitingForScripts() const override final;
88 bool isExecutingScript() const override final; 87 bool isExecutingScript() const override final;
89 void resumeAfterWaitingForImports() override final; 88 void resumeAfterWaitingForImports() override final;
90 89
91 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi on()); }
92
93 private: 90 private:
94 HTMLDocumentParser(HTMLDocument&, bool reportErrors); 91 HTMLDocumentParser(HTMLDocument&, bool reportErrors);
95 92
96 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } 93 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); }
97 94
98 bool hasInsertionPoint(); 95 bool hasInsertionPoint();
99 96
100 void stopBackgroundParser(); 97 void stopBackgroundParser();
101 void processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); 98 void processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
102 void pumpPendingSpeculations(); 99 void pumpPendingSpeculations();
(...skipping 29 matching lines...) Expand all
132 129
133 bool m_isFragment; 130 bool m_isFragment;
134 bool m_endWasDelayed; 131 bool m_endWasDelayed;
135 bool m_haveBackgroundParser; 132 bool m_haveBackgroundParser;
136 unsigned m_pumpSessionNestingLevel; 133 unsigned m_pumpSessionNestingLevel;
137 }; 134 };
138 135
139 } 136 }
140 137
141 #endif // SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_ 138 #endif // SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/html/imports/HTMLImportsController.cpp ('k') | sky/engine/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698