| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 struct Checkpoint { | 58 struct Checkpoint { |
| 59 WeakPtr<HTMLDocumentParser> parser; | 59 WeakPtr<HTMLDocumentParser> parser; |
| 60 OwnPtr<HTMLToken> token; | 60 OwnPtr<HTMLToken> token; |
| 61 OwnPtr<HTMLTokenizer> tokenizer; | 61 OwnPtr<HTMLTokenizer> tokenizer; |
| 62 HTMLTreeBuilderSimulator::State treeBuilderState; | 62 HTMLTreeBuilderSimulator::State treeBuilderState; |
| 63 HTMLInputCheckpoint inputCheckpoint; | 63 HTMLInputCheckpoint inputCheckpoint; |
| 64 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; | 64 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; |
| 65 String unparsedInput; | 65 String unparsedInput; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 void appendBytes(PassOwnPtr<Vector<char> >); | 68 void appendRawBytesFromParserThread(const char* data, int dataLength); |
| 69 |
| 70 void appendRawBytesFromMainThread(PassOwnPtr<Vector<char> >); |
| 69 void setDecoder(PassOwnPtr<TextResourceDecoder>); | 71 void setDecoder(PassOwnPtr<TextResourceDecoder>); |
| 70 void flush(); | 72 void flush(); |
| 71 void resumeFrom(PassOwnPtr<Checkpoint>); | 73 void resumeFrom(PassOwnPtr<Checkpoint>); |
| 72 void startedChunkWithCheckpoint(HTMLInputCheckpoint); | 74 void startedChunkWithCheckpoint(HTMLInputCheckpoint); |
| 73 void finish(); | 75 void finish(); |
| 74 void stop(); | 76 void stop(); |
| 75 | 77 |
| 76 void forcePlaintextForTextDocument(); | 78 void forcePlaintextForTextDocument(); |
| 77 | 79 |
| 78 private: | 80 private: |
| 79 BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassO
wnPtr<Configuration>); | 81 BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassO
wnPtr<Configuration>); |
| 80 ~BackgroundHTMLParser(); | 82 ~BackgroundHTMLParser(); |
| 81 | 83 |
| 82 void append(const String&); | 84 void appendDecodedBytes(const String&); |
| 83 void markEndOfFile(); | 85 void markEndOfFile(); |
| 84 void pumpTokenizer(); | 86 void pumpTokenizer(); |
| 85 void sendTokensToMainThread(); | 87 void sendTokensToMainThread(); |
| 86 void updateDocument(const String& decodedData); | 88 void updateDocument(const String& decodedData); |
| 87 | 89 |
| 88 WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; | 90 WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; |
| 89 BackgroundHTMLInputStream m_input; | 91 BackgroundHTMLInputStream m_input; |
| 90 HTMLSourceTracker m_sourceTracker; | 92 HTMLSourceTracker m_sourceTracker; |
| 91 OwnPtr<HTMLToken> m_token; | 93 OwnPtr<HTMLToken> m_token; |
| 92 OwnPtr<HTMLTokenizer> m_tokenizer; | 94 OwnPtr<HTMLTokenizer> m_tokenizer; |
| 93 HTMLTreeBuilderSimulator m_treeBuilderSimulator; | 95 HTMLTreeBuilderSimulator m_treeBuilderSimulator; |
| 94 HTMLParserOptions m_options; | 96 HTMLParserOptions m_options; |
| 95 WeakPtr<HTMLDocumentParser> m_parser; | 97 WeakPtr<HTMLDocumentParser> m_parser; |
| 96 | 98 |
| 97 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; | 99 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; |
| 98 PreloadRequestStream m_pendingPreloads; | 100 PreloadRequestStream m_pendingPreloads; |
| 99 XSSInfoStream m_pendingXSSInfos; | 101 XSSInfoStream m_pendingXSSInfos; |
| 100 | 102 |
| 101 OwnPtr<XSSAuditor> m_xssAuditor; | 103 OwnPtr<XSSAuditor> m_xssAuditor; |
| 102 OwnPtr<TokenPreloadScanner> m_preloadScanner; | 104 OwnPtr<TokenPreloadScanner> m_preloadScanner; |
| 103 OwnPtr<TextResourceDecoder> m_decoder; | 105 OwnPtr<TextResourceDecoder> m_decoder; |
| 104 DocumentEncodingData m_lastSeenEncodingData; | 106 DocumentEncodingData m_lastSeenEncodingData; |
| 105 }; | 107 }; |
| 106 | 108 |
| 107 } | 109 } |
| 108 | 110 |
| 109 #endif | 111 #endif |
| OLD | NEW |