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

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

Issue 934083002: Remove the concept of pendingScripts from HTMLScriptRunner (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/dom/Document.h ('k') | sky/engine/core/html/parser/BackgroundHTMLParser.cpp » ('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) 2013 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2013 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ~BackgroundHTMLParser(); 59 ~BackgroundHTMLParser();
60 60
61 // DataPipeDrainer::Client: 61 // DataPipeDrainer::Client:
62 void OnDataAvailable(const void* data, size_t numberOfBytes) override; 62 void OnDataAvailable(const void* data, size_t numberOfBytes) override;
63 void OnDataComplete() override; 63 void OnDataComplete() override;
64 64
65 void finish(); 65 void finish();
66 void markEndOfFile(); 66 void markEndOfFile();
67 void pumpTokenizer(); 67 void pumpTokenizer();
68 void sendTokensToMainThread(); 68 void sendTokensToMainThread();
69 bool updateTokenizerState(const CompactHTMLToken& token); 69
70 enum ContinueBehavior {
71 ContinueParsing,
72 SendTokensIncludingLast,
73 SendTokensExceptingLast,
74 };
75
76 ContinueBehavior updateTokenizerState(const CompactHTMLToken& token);
70 77
71 enum State { 78 enum State {
72 InitialState, 79 InitialState,
73 DidSeeImportState, 80 DidSeeImportState,
74 }; 81 };
75 82
76 State m_state; 83 State m_state;
77 SegmentedString m_input; 84 SegmentedString m_input;
78 OwnPtr<HTMLToken> m_token; 85 OwnPtr<HTMLToken> m_token;
79 OwnPtr<HTMLTokenizer> m_tokenizer; 86 OwnPtr<HTMLTokenizer> m_tokenizer;
80 base::WeakPtr<HTMLDocumentParser> m_parser; 87 base::WeakPtr<HTMLDocumentParser> m_parser;
81 88
82 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; 89 OwnPtr<CompactHTMLTokenStream> m_pendingTokens;
83 OwnPtr<TextResourceDecoder> m_decoder; 90 OwnPtr<TextResourceDecoder> m_decoder;
84 91
85 mojo::ScopedDataPipeConsumerHandle m_source; 92 mojo::ScopedDataPipeConsumerHandle m_source;
86 OwnPtr<mojo::common::DataPipeDrainer> m_drainer; 93 OwnPtr<mojo::common::DataPipeDrainer> m_drainer;
87 94
88 base::WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; 95 base::WeakPtrFactory<BackgroundHTMLParser> m_weakFactory;
89 }; 96 };
90 97
91 } 98 }
92 99
93 #endif // SKY_ENGINE_CORE_HTML_PARSER_BACKGROUNDHTMLPARSER_H_ 100 #endif // SKY_ENGINE_CORE_HTML_PARSER_BACKGROUNDHTMLPARSER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698