| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SKY_ENGINE_CORE_HTML_IMPORTS_HTMLIMPORTTREEROOT_H_ | |
| 6 #define SKY_ENGINE_CORE_HTML_IMPORTS_HTMLIMPORTTREEROOT_H_ | |
| 7 | |
| 8 #include "sky/engine/core/html/imports/HTMLImport.h" | |
| 9 #include "sky/engine/platform/Timer.h" | |
| 10 #include "sky/engine/wtf/PassOwnPtr.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class HTMLImportChild; | |
| 15 | |
| 16 class HTMLImportTreeRoot : public HTMLImport { | |
| 17 public: | |
| 18 static PassOwnPtr<HTMLImportTreeRoot> create(Document*); | |
| 19 | |
| 20 virtual ~HTMLImportTreeRoot(); | |
| 21 | |
| 22 // HTMLImport | |
| 23 virtual Document* document() const override; | |
| 24 virtual bool isDone() const override; | |
| 25 virtual void stateWillChange() override; | |
| 26 virtual void stateDidChange() override; | |
| 27 | |
| 28 void scheduleRecalcState(); | |
| 29 | |
| 30 HTMLImportChild* add(PassOwnPtr<HTMLImportChild>); | |
| 31 HTMLImportChild* find(const KURL&) const; | |
| 32 | |
| 33 private: | |
| 34 explicit HTMLImportTreeRoot(Document*); | |
| 35 | |
| 36 void recalcTimerFired(Timer<HTMLImportTreeRoot>*); | |
| 37 | |
| 38 RawPtr<Document> m_document; | |
| 39 Timer<HTMLImportTreeRoot> m_recalcTimer; | |
| 40 | |
| 41 // List of import which has been loaded or being loaded. | |
| 42 typedef Vector<OwnPtr<HTMLImportChild> > ImportList; | |
| 43 ImportList m_imports; | |
| 44 }; | |
| 45 | |
| 46 DEFINE_TYPE_CASTS(HTMLImportTreeRoot, HTMLImport, import, import->isRoot(), impo
rt.isRoot()); | |
| 47 | |
| 48 } | |
| 49 | |
| 50 #endif // SKY_ENGINE_CORE_HTML_IMPORTS_HTMLIMPORTTREEROOT_H_ | |
| OLD | NEW |