| 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 28 matching lines...) Expand all Loading... |
| 39 #include "wtf/WeakPtr.h" | 39 #include "wtf/WeakPtr.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class HTMLDocumentParser; | 43 class HTMLDocumentParser; |
| 44 class XSSAuditor; | 44 class XSSAuditor; |
| 45 class WebScheduler; | 45 class WebScheduler; |
| 46 | 46 |
| 47 class BackgroundHTMLParser { | 47 class BackgroundHTMLParser { |
| 48 WTF_MAKE_FAST_ALLOCATED(BackgroundHTMLParser); | 48 WTF_MAKE_FAST_ALLOCATED(BackgroundHTMLParser); |
| 49 WTF_MAKE_NONCOPYABLE(BackgroundHTMLParser); |
| 49 public: | 50 public: |
| 50 struct Configuration { | 51 struct Configuration { |
| 52 WTF_MAKE_FAST_ALLOCATED(Configuration); |
| 53 public: |
| 51 Configuration(); | 54 Configuration(); |
| 52 HTMLParserOptions options; | 55 HTMLParserOptions options; |
| 53 WeakPtr<HTMLDocumentParser> parser; | 56 WeakPtr<HTMLDocumentParser> parser; |
| 54 OwnPtr<XSSAuditor> xssAuditor; | 57 OwnPtr<XSSAuditor> xssAuditor; |
| 55 OwnPtr<TokenPreloadScanner> preloadScanner; | 58 OwnPtr<TokenPreloadScanner> preloadScanner; |
| 56 OwnPtr<TextResourceDecoder> decoder; | 59 OwnPtr<TextResourceDecoder> decoder; |
| 57 // outstandingTokenLimit must be greater than or equal to | 60 // outstandingTokenLimit must be greater than or equal to |
| 58 // pendingTokenLimit | 61 // pendingTokenLimit |
| 59 size_t outstandingTokenLimit; | 62 size_t outstandingTokenLimit; |
| 60 size_t pendingTokenLimit; | 63 size_t pendingTokenLimit; |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 static void start(PassRefPtr<WeakReference<BackgroundHTMLParser>>, PassOwnPt
r<Configuration>, WebScheduler*); | 66 static void start(PassRefPtr<WeakReference<BackgroundHTMLParser>>, PassOwnPt
r<Configuration>, WebScheduler*); |
| 64 | 67 |
| 65 struct Checkpoint { | 68 struct Checkpoint { |
| 69 WTF_MAKE_FAST_ALLOCATED(CheckPoint); |
| 70 public: |
| 66 WeakPtr<HTMLDocumentParser> parser; | 71 WeakPtr<HTMLDocumentParser> parser; |
| 67 OwnPtr<HTMLToken> token; | 72 OwnPtr<HTMLToken> token; |
| 68 OwnPtr<HTMLTokenizer> tokenizer; | 73 OwnPtr<HTMLTokenizer> tokenizer; |
| 69 HTMLTreeBuilderSimulator::State treeBuilderState; | 74 HTMLTreeBuilderSimulator::State treeBuilderState; |
| 70 HTMLInputCheckpoint inputCheckpoint; | 75 HTMLInputCheckpoint inputCheckpoint; |
| 71 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; | 76 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; |
| 72 String unparsedInput; | 77 String unparsedInput; |
| 73 }; | 78 }; |
| 74 | 79 |
| 75 void appendRawBytesFromParserThread(const char* data, int dataLength); | 80 void appendRawBytesFromParserThread(const char* data, int dataLength); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 OwnPtr<TextResourceDecoder> m_decoder; | 119 OwnPtr<TextResourceDecoder> m_decoder; |
| 115 DocumentEncodingData m_lastSeenEncodingData; | 120 DocumentEncodingData m_lastSeenEncodingData; |
| 116 WebScheduler* m_scheduler; // NOT OWNED, scheduler will outlive BackgroundHT
MLParser | 121 WebScheduler* m_scheduler; // NOT OWNED, scheduler will outlive BackgroundHT
MLParser |
| 117 | 122 |
| 118 bool m_startingScript; | 123 bool m_startingScript; |
| 119 }; | 124 }; |
| 120 | 125 |
| 121 } | 126 } |
| 122 | 127 |
| 123 #endif | 128 #endif |
| OLD | NEW |