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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "core/dom/DocumentParserClient.h" | 34 #include "core/dom/DocumentParserClient.h" |
35 #include "core/fetch/RawResource.h" | 35 #include "core/fetch/RawResource.h" |
36 #include "core/fetch/ResourceOwner.h" | 36 #include "core/fetch/ResourceOwner.h" |
37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
39 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
40 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class CustomElementSyncMicrotaskQueue; | 44 class V0CustomElementSyncMicrotaskQueue; |
45 class Document; | 45 class Document; |
46 class DocumentWriter; | 46 class DocumentWriter; |
47 class HTMLImportChild; | 47 class HTMLImportChild; |
48 class HTMLImportsController; | 48 class HTMLImportsController; |
49 | 49 |
50 | 50 |
51 // Owning imported Document lifetime. It also implements ResourceClient through
ResourceOwner | 51 // Owning imported Document lifetime. It also implements ResourceClient through
ResourceOwner |
52 // to feed fetched bytes to the DocumentWriter of the imported document. | 52 // to feed fetched bytes to the DocumentWriter of the imported document. |
53 // HTMLImportLoader is owned by HTMLImportsController. | 53 // HTMLImportLoader is owned by HTMLImportsController. |
54 class HTMLImportLoader final : public GarbageCollectedFinalized<HTMLImportLoader
>, public ResourceOwner<RawResource>, public DocumentParserClient { | 54 class HTMLImportLoader final : public GarbageCollectedFinalized<HTMLImportLoader
>, public ResourceOwner<RawResource>, public DocumentParserClient { |
(...skipping 27 matching lines...) Expand all Loading... |
82 bool hasError() const { return m_state == StateError; } | 82 bool hasError() const { return m_state == StateError; } |
83 bool shouldBlockScriptExecution() const; | 83 bool shouldBlockScriptExecution() const; |
84 | 84 |
85 void startLoading(RawResource*); | 85 void startLoading(RawResource*); |
86 | 86 |
87 // Tells the loader that all of the import's stylesheets finished | 87 // Tells the loader that all of the import's stylesheets finished |
88 // loading. | 88 // loading. |
89 // Called by Document::didRemoveAllPendingStylesheet. | 89 // Called by Document::didRemoveAllPendingStylesheet. |
90 void didRemoveAllPendingStylesheet(); | 90 void didRemoveAllPendingStylesheet(); |
91 | 91 |
92 CustomElementSyncMicrotaskQueue* microtaskQueue() const; | 92 V0CustomElementSyncMicrotaskQueue* microtaskQueue() const; |
93 | 93 |
94 DECLARE_VIRTUAL_TRACE(); | 94 DECLARE_VIRTUAL_TRACE(); |
95 | 95 |
96 private: | 96 private: |
97 HTMLImportLoader(HTMLImportsController*); | 97 HTMLImportLoader(HTMLImportsController*); |
98 | 98 |
99 // RawResourceClient | 99 // RawResourceClient |
100 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebData
ConsumerHandle>) override; | 100 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebData
ConsumerHandle>) override; |
101 void dataReceived(Resource*, const char* data, size_t length) override; | 101 void dataReceived(Resource*, const char* data, size_t length) override; |
102 void notifyFinished(Resource*) override; | 102 void notifyFinished(Resource*) override; |
(...skipping 11 matching lines...) Expand all Loading... |
114 | 114 |
115 void setState(State); | 115 void setState(State); |
116 void didFinishLoading(); | 116 void didFinishLoading(); |
117 bool hasPendingResources() const; | 117 bool hasPendingResources() const; |
118 | 118 |
119 Member<HTMLImportsController> m_controller; | 119 Member<HTMLImportsController> m_controller; |
120 HeapVector<Member<HTMLImportChild>> m_imports; | 120 HeapVector<Member<HTMLImportChild>> m_imports; |
121 State m_state; | 121 State m_state; |
122 Member<Document> m_document; | 122 Member<Document> m_document; |
123 Member<DocumentWriter> m_writer; | 123 Member<DocumentWriter> m_writer; |
124 Member<CustomElementSyncMicrotaskQueue> m_microtaskQueue; | 124 Member<V0CustomElementSyncMicrotaskQueue> m_microtaskQueue; |
125 }; | 125 }; |
126 | 126 |
127 } // namespace blink | 127 } // namespace blink |
128 | 128 |
129 #endif // HTMLImportLoader_h | 129 #endif // HTMLImportLoader_h |
OLD | NEW |