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 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef HTMLImportsController_h | 31 #ifndef HTMLImportsController_h |
32 #define HTMLImportsController_h | 32 #define HTMLImportsController_h |
33 | 33 |
34 #include "core/dom/DocumentSupplementable.h" | 34 #include "core/dom/DocumentSupplementable.h" |
35 #include "core/fetch/RawResource.h" | 35 #include "platform/heap/Handle.h" |
36 #include "core/html/LinkResource.h" | |
37 #include "core/html/imports/HTMLImport.h" | |
38 #include "platform/Supplementable.h" | |
39 #include "platform/Timer.h" | |
40 #include "wtf/FastAllocBase.h" | 36 #include "wtf/FastAllocBase.h" |
41 #include "wtf/PassOwnPtr.h" | |
42 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
43 | 38 |
44 namespace blink { | 39 namespace blink { |
45 | 40 |
46 class FetchRequest; | 41 class FetchRequest; |
| 42 class HTMLImport; |
47 class HTMLImportChild; | 43 class HTMLImportChild; |
48 class HTMLImportChildClient; | 44 class HTMLImportChildClient; |
49 class HTMLImportLoader; | 45 class HTMLImportLoader; |
50 class HTMLImportTreeRoot; | 46 class HTMLImportTreeRoot; |
| 47 class KURL; |
51 | 48 |
52 class HTMLImportsController final : public NoBaseWillBeGarbageCollectedFinalized
<HTMLImportsController>, public DocumentSupplement { | 49 class HTMLImportsController final : public NoBaseWillBeGarbageCollectedFinalized
<HTMLImportsController>, public DocumentSupplement { |
53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLImportsController); | 50 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLImportsController); |
54 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(HTMLImportsController); | 51 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(HTMLImportsController); |
55 public: | 52 public: |
56 static const char* supplementName(); | 53 static const char* supplementName(); |
57 static void provideTo(Document&); | 54 static void provideTo(Document&); |
58 static void removeFrom(Document&); | 55 static void removeFrom(Document&); |
59 | 56 |
60 explicit HTMLImportsController(Document&); | 57 explicit HTMLImportsController(Document&); |
(...skipping 11 matching lines...) Expand all Loading... |
72 size_t loaderCount() const { return m_loaders.size(); } | 69 size_t loaderCount() const { return m_loaders.size(); } |
73 HTMLImportLoader* loaderAt(size_t i) const { return m_loaders[i].get(); } | 70 HTMLImportLoader* loaderAt(size_t i) const { return m_loaders[i].get(); } |
74 Document* loaderDocumentAt(size_t) const; | 71 Document* loaderDocumentAt(size_t) const; |
75 HTMLImportLoader* loaderFor(const Document&) const; | 72 HTMLImportLoader* loaderFor(const Document&) const; |
76 | 73 |
77 DECLARE_VIRTUAL_TRACE(); | 74 DECLARE_VIRTUAL_TRACE(); |
78 | 75 |
79 private: | 76 private: |
80 HTMLImportChild* createChild(const KURL&, HTMLImportLoader*, HTMLImport* par
ent, HTMLImportChildClient*); | 77 HTMLImportChild* createChild(const KURL&, HTMLImportLoader*, HTMLImport* par
ent, HTMLImportChildClient*); |
81 | 78 |
| 79 void dispose(); |
| 80 |
82 OwnPtrWillBeMember<HTMLImportTreeRoot> m_root; | 81 OwnPtrWillBeMember<HTMLImportTreeRoot> m_root; |
83 typedef WillBeHeapVector<OwnPtrWillBeMember<HTMLImportLoader>> LoaderList; | 82 using LoaderList = WillBeHeapVector<OwnPtrWillBeMember<HTMLImportLoader>>; |
84 LoaderList m_loaders; | 83 LoaderList m_loaders; |
85 }; | 84 }; |
86 | 85 |
87 } // namespace blink | 86 } // namespace blink |
88 | 87 |
89 #endif // HTMLImportsController_h | 88 #endif // HTMLImportsController_h |
OLD | NEW |