OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2010 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 typedef size_t TokenPreloadScannerCheckpoint; | 42 typedef size_t TokenPreloadScannerCheckpoint; |
43 | 43 |
44 class HTMLParserOptions; | 44 class HTMLParserOptions; |
45 class HTMLTokenizer; | 45 class HTMLTokenizer; |
46 class SegmentedString; | 46 class SegmentedString; |
47 | 47 |
48 struct CORE_EXPORT CachedDocumentParameters { | 48 struct CORE_EXPORT CachedDocumentParameters { |
49 static PassOwnPtr<CachedDocumentParameters> create(Document* document, PassR
efPtr<MediaValues> mediaValues = nullptr) | 49 static PassOwnPtr<CachedDocumentParameters> create(Document* document, PassR
efPtrWillBeRawPtr<MediaValues> mediaValues = nullptr) |
50 { | 50 { |
51 return adoptPtr(new CachedDocumentParameters(document, mediaValues)); | 51 return adoptPtr(new CachedDocumentParameters(document, mediaValues)); |
52 } | 52 } |
53 | 53 |
54 bool doHtmlPreloadScanning; | 54 bool doHtmlPreloadScanning; |
55 RefPtr<MediaValues> mediaValues; | 55 RefPtrWillBeCrossThreadPersistent<MediaValues> mediaValues; |
56 Length defaultViewportMinWidth; | 56 Length defaultViewportMinWidth; |
57 bool viewportMetaZeroValuesQuirk; | 57 bool viewportMetaZeroValuesQuirk; |
58 bool viewportMetaEnabled; | 58 bool viewportMetaEnabled; |
59 ReferrerPolicy referrerPolicy; | 59 ReferrerPolicy referrerPolicy; |
60 | 60 |
61 private: | 61 private: |
62 CachedDocumentParameters(Document*, PassRefPtr<MediaValues>); | 62 CachedDocumentParameters(Document*, PassRefPtrWillBeRawPtr<MediaValues>); |
63 }; | 63 }; |
64 | 64 |
65 class TokenPreloadScanner { | 65 class TokenPreloadScanner { |
66 WTF_MAKE_NONCOPYABLE(TokenPreloadScanner); WTF_MAKE_FAST_ALLOCATED(TokenPrel
oadScanner); | 66 WTF_MAKE_NONCOPYABLE(TokenPreloadScanner); WTF_MAKE_FAST_ALLOCATED(TokenPrel
oadScanner); |
67 public: | 67 public: |
68 TokenPreloadScanner(const KURL& documentURL, PassOwnPtr<CachedDocumentParame
ters>); | 68 TokenPreloadScanner(const KURL& documentURL, PassOwnPtr<CachedDocumentParame
ters>); |
69 ~TokenPreloadScanner(); | 69 ~TokenPreloadScanner(); |
70 | 70 |
71 void scan(const HTMLToken&, const SegmentedString&, PreloadRequestStream& re
quests); | 71 void scan(const HTMLToken&, const SegmentedString&, PreloadRequestStream& re
quests); |
72 void scan(const CompactHTMLToken&, const SegmentedString&, PreloadRequestStr
eam& requests); | 72 void scan(const CompactHTMLToken&, const SegmentedString&, PreloadRequestStr
eam& requests); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 private: | 156 private: |
157 TokenPreloadScanner m_scanner; | 157 TokenPreloadScanner m_scanner; |
158 SegmentedString m_source; | 158 SegmentedString m_source; |
159 HTMLToken m_token; | 159 HTMLToken m_token; |
160 OwnPtr<HTMLTokenizer> m_tokenizer; | 160 OwnPtr<HTMLTokenizer> m_tokenizer; |
161 }; | 161 }; |
162 | 162 |
163 } | 163 } |
164 | 164 |
165 #endif | 165 #endif |
OLD | NEW |