| OLD | NEW |
| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool updateTokenizerState(const CompactHTMLToken& token); |
| 70 | 70 |
| 71 enum State { |
| 72 InitialState, |
| 73 DidSeeImportState, |
| 74 }; |
| 75 |
| 76 State m_state; |
| 71 SegmentedString m_input; | 77 SegmentedString m_input; |
| 72 OwnPtr<HTMLToken> m_token; | 78 OwnPtr<HTMLToken> m_token; |
| 73 OwnPtr<HTMLTokenizer> m_tokenizer; | 79 OwnPtr<HTMLTokenizer> m_tokenizer; |
| 74 base::WeakPtr<HTMLDocumentParser> m_parser; | 80 base::WeakPtr<HTMLDocumentParser> m_parser; |
| 75 | 81 |
| 76 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; | 82 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; |
| 77 OwnPtr<TextResourceDecoder> m_decoder; | 83 OwnPtr<TextResourceDecoder> m_decoder; |
| 78 | 84 |
| 79 mojo::ScopedDataPipeConsumerHandle m_source; | 85 mojo::ScopedDataPipeConsumerHandle m_source; |
| 80 OwnPtr<mojo::common::DataPipeDrainer> m_drainer; | 86 OwnPtr<mojo::common::DataPipeDrainer> m_drainer; |
| 81 | 87 |
| 82 base::WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; | 88 base::WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; |
| 83 }; | 89 }; |
| 84 | 90 |
| 85 } | 91 } |
| 86 | 92 |
| 87 #endif // SKY_ENGINE_CORE_HTML_PARSER_BACKGROUNDHTMLPARSER_H_ | 93 #endif // SKY_ENGINE_CORE_HTML_PARSER_BACKGROUNDHTMLPARSER_H_ |
| OLD | NEW |