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 24 matching lines...) Expand all Loading... |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 #include "platform/weborigin/KURL.h" | 36 #include "platform/weborigin/KURL.h" |
37 #include "wtf/WeakPtr.h" | 37 #include "wtf/WeakPtr.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class CustomElementMicrotaskImportStep; | 41 class CustomElementMicrotaskImportStep; |
42 class HTMLImportLoader; | 42 class HTMLImportLoader; |
43 class HTMLImportChildClient; | 43 class HTMLImportChildClient; |
44 class Element; | 44 class Element; |
| 45 class Module; |
45 | 46 |
46 // | 47 // |
47 // An import tree node subclas to encapsulate imported document | 48 // An import tree node subclas to encapsulate imported document |
48 // lifecycle. This class is owned by HTMLImportsController. The actual loading | 49 // lifecycle. This class is owned by HTMLImportsController. The actual loading |
49 // is done by HTMLImportLoader, which can be shared among multiple | 50 // is done by HTMLImportLoader, which can be shared among multiple |
50 // HTMLImportChild of same link URL. | 51 // HTMLImportChild of same link URL. |
51 // | 52 // |
52 class HTMLImportChild final : public HTMLImport { | 53 class HTMLImportChild final : public HTMLImport { |
53 public: | 54 public: |
54 HTMLImportChild(const KURL&, HTMLImportLoader*, SyncMode); | 55 HTMLImportChild(const KURL&, HTMLImportLoader*, SyncMode); |
55 virtual ~HTMLImportChild(); | 56 virtual ~HTMLImportChild(); |
56 | 57 |
57 Element* link() const; | 58 Element* link() const; |
58 const KURL& url() const { return m_url; } | 59 const KURL& url() const { return m_url; } |
59 | 60 |
60 void ownerInserted(); | 61 void ownerInserted(); |
61 void didShareLoader(); | 62 void didShareLoader(); |
62 void didStartLoading(); | 63 void didStartLoading(); |
63 #if !ENABLE(OILPAN) | 64 #if !ENABLE(OILPAN) |
64 void importDestroyed(); | 65 void importDestroyed(); |
65 WeakPtr<HTMLImportChild> weakPtr() { return m_weakFactory.createWeakPtr(); } | 66 WeakPtr<HTMLImportChild> weakPtr() { return m_weakFactory.createWeakPtr(); } |
66 #endif | 67 #endif |
67 | 68 |
| 69 Module* module() const; |
| 70 |
68 // HTMLImport | 71 // HTMLImport |
69 virtual Document* document() const override; | 72 virtual Document* document() const override; |
70 virtual bool isDone() const override; | 73 virtual bool isDone() const override; |
71 virtual HTMLImportLoader* loader() const override; | 74 virtual HTMLImportLoader* loader() const override; |
72 virtual void stateWillChange() override; | 75 virtual void stateWillChange() override; |
73 virtual void stateDidChange() override; | 76 virtual void stateDidChange() override; |
74 virtual void trace(Visitor*) override; | 77 virtual void trace(Visitor*) override; |
75 | 78 |
76 #if !defined(NDEBUG) | 79 #if !defined(NDEBUG) |
77 virtual void showThis() override; | 80 virtual void showThis() override; |
(...skipping 25 matching lines...) Expand all Loading... |
103 | 106 |
104 inline HTMLImportChild* toHTMLImportChild(HTMLImport* import) | 107 inline HTMLImportChild* toHTMLImportChild(HTMLImport* import) |
105 { | 108 { |
106 ASSERT(!import || !import->isRoot()); | 109 ASSERT(!import || !import->isRoot()); |
107 return static_cast<HTMLImportChild*>(import); | 110 return static_cast<HTMLImportChild*>(import); |
108 } | 111 } |
109 | 112 |
110 } // namespace blink | 113 } // namespace blink |
111 | 114 |
112 #endif // HTMLImportChild_h | 115 #endif // HTMLImportChild_h |
OLD | NEW |