| 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 15 matching lines...) Expand all Loading... |
| 26 #ifndef BackgroundHTMLParser_h | 26 #ifndef BackgroundHTMLParser_h |
| 27 #define BackgroundHTMLParser_h | 27 #define BackgroundHTMLParser_h |
| 28 | 28 |
| 29 #include "core/dom/DocumentEncodingData.h" | 29 #include "core/dom/DocumentEncodingData.h" |
| 30 #include "core/html/parser/BackgroundHTMLInputStream.h" | 30 #include "core/html/parser/BackgroundHTMLInputStream.h" |
| 31 #include "core/html/parser/CompactHTMLToken.h" | 31 #include "core/html/parser/CompactHTMLToken.h" |
| 32 #include "core/html/parser/HTMLParserOptions.h" | 32 #include "core/html/parser/HTMLParserOptions.h" |
| 33 #include "core/html/parser/HTMLPreloadScanner.h" | 33 #include "core/html/parser/HTMLPreloadScanner.h" |
| 34 #include "core/html/parser/HTMLSourceTracker.h" | 34 #include "core/html/parser/HTMLSourceTracker.h" |
| 35 #include "core/html/parser/HTMLTreeBuilderSimulator.h" | 35 #include "core/html/parser/HTMLTreeBuilderSimulator.h" |
| 36 #include "core/html/parser/ParsedChunkQueue.h" | |
| 37 #include "core/html/parser/TextResourceDecoder.h" | 36 #include "core/html/parser/TextResourceDecoder.h" |
| 38 #include "core/html/parser/XSSAuditorDelegate.h" | 37 #include "core/html/parser/XSSAuditorDelegate.h" |
| 39 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
| 40 #include "wtf/WeakPtr.h" | 39 #include "wtf/WeakPtr.h" |
| 41 | 40 |
| 42 namespace blink { | 41 namespace blink { |
| 43 | 42 |
| 44 class HTMLDocumentParser; | 43 class HTMLDocumentParser; |
| 45 class XSSAuditor; | 44 class XSSAuditor; |
| 46 class WebTaskRunner; | 45 class WebTaskRunner; |
| 47 | 46 |
| 48 class BackgroundHTMLParser { | 47 class BackgroundHTMLParser { |
| 49 WTF_MAKE_FAST_ALLOCATED(BackgroundHTMLParser); | 48 WTF_MAKE_FAST_ALLOCATED(BackgroundHTMLParser); |
| 50 WTF_MAKE_NONCOPYABLE(BackgroundHTMLParser); | 49 WTF_MAKE_NONCOPYABLE(BackgroundHTMLParser); |
| 51 public: | 50 public: |
| 52 struct Configuration { | 51 struct Configuration { |
| 53 WTF_MAKE_FAST_ALLOCATED(Configuration); | 52 WTF_MAKE_FAST_ALLOCATED(Configuration); |
| 54 public: | 53 public: |
| 55 Configuration(); | 54 Configuration(); |
| 56 HTMLParserOptions options; | 55 HTMLParserOptions options; |
| 57 WeakPtr<HTMLDocumentParser> parser; | 56 WeakPtr<HTMLDocumentParser> parser; |
| 58 OwnPtr<XSSAuditor> xssAuditor; | 57 OwnPtr<XSSAuditor> xssAuditor; |
| 59 OwnPtr<TokenPreloadScanner> preloadScanner; | 58 OwnPtr<TokenPreloadScanner> preloadScanner; |
| 60 OwnPtr<TextResourceDecoder> decoder; | 59 OwnPtr<TextResourceDecoder> decoder; |
| 61 ParsedChunkQueue* parsedChunkQueue; | |
| 62 // outstandingTokenLimit must be greater than or equal to | 60 // outstandingTokenLimit must be greater than or equal to |
| 63 // pendingTokenLimit | 61 // pendingTokenLimit |
| 64 size_t outstandingTokenLimit; | 62 size_t outstandingTokenLimit; |
| 65 size_t pendingTokenLimit; | 63 size_t pendingTokenLimit; |
| 66 }; | 64 }; |
| 67 | 65 |
| 68 static void start(PassRefPtr<WeakReference<BackgroundHTMLParser>>, PassOwnPt
r<Configuration>, PassOwnPtr<WebTaskRunner>); | 66 static void start(PassRefPtr<WeakReference<BackgroundHTMLParser>>, PassOwnPt
r<Configuration>, PassOwnPtr<WebTaskRunner>); |
| 69 | 67 |
| 70 struct Checkpoint { | 68 struct Checkpoint { |
| 71 WTF_MAKE_FAST_ALLOCATED(CheckPoint); | 69 WTF_MAKE_FAST_ALLOCATED(CheckPoint); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; | 112 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; |
| 115 const size_t m_pendingTokenLimit; | 113 const size_t m_pendingTokenLimit; |
| 116 PreloadRequestStream m_pendingPreloads; | 114 PreloadRequestStream m_pendingPreloads; |
| 117 XSSInfoStream m_pendingXSSInfos; | 115 XSSInfoStream m_pendingXSSInfos; |
| 118 | 116 |
| 119 OwnPtr<XSSAuditor> m_xssAuditor; | 117 OwnPtr<XSSAuditor> m_xssAuditor; |
| 120 OwnPtr<TokenPreloadScanner> m_preloadScanner; | 118 OwnPtr<TokenPreloadScanner> m_preloadScanner; |
| 121 OwnPtr<TextResourceDecoder> m_decoder; | 119 OwnPtr<TextResourceDecoder> m_decoder; |
| 122 DocumentEncodingData m_lastSeenEncodingData; | 120 DocumentEncodingData m_lastSeenEncodingData; |
| 123 OwnPtr<WebTaskRunner> m_loadingTaskRunner; | 121 OwnPtr<WebTaskRunner> m_loadingTaskRunner; |
| 124 ParsedChunkQueue* m_parsedChunkQueue; | |
| 125 | 122 |
| 126 bool m_startingScript; | 123 bool m_startingScript; |
| 127 }; | 124 }; |
| 128 | 125 |
| 129 } | 126 } |
| 130 | 127 |
| 131 #endif | 128 #endif |
| OLD | NEW |