Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef HTMLImportTreeRoot_h | 5 #ifndef HTMLImportTreeRoot_h |
| 6 #define HTMLImportTreeRoot_h | 6 #define HTMLImportTreeRoot_h |
| 7 | 7 |
| 8 #include "core/html/imports/HTMLImport.h" | 8 #include "core/html/imports/HTMLImport.h" |
| 9 #include "platform/Timer.h" | 9 #include "platform/Timer.h" |
| 10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
| 11 | 11 |
| 12 namespace WebCore { | 12 namespace WebCore { |
| 13 | 13 |
| 14 class HTMLImportChild; | |
| 15 | |
| 14 class HTMLImportTreeRoot : public HTMLImport { | 16 class HTMLImportTreeRoot : public HTMLImport { |
| 15 public: | 17 public: |
| 16 static PassOwnPtr<HTMLImportTreeRoot> create(Document*); | 18 static PassOwnPtr<HTMLImportTreeRoot> create(Document*); |
| 17 | 19 |
| 20 virtual ~HTMLImportTreeRoot(); | |
| 21 | |
| 18 // HTMLImport | 22 // HTMLImport |
| 19 virtual Document* document() const OVERRIDE; | 23 virtual Document* document() const OVERRIDE; |
| 20 virtual bool isDone() const OVERRIDE; | 24 virtual bool isDone() const OVERRIDE; |
| 21 virtual void stateWillChange() OVERRIDE; | 25 virtual void stateWillChange() OVERRIDE; |
| 22 virtual void stateDidChange() OVERRIDE; | 26 virtual void stateDidChange() OVERRIDE; |
| 23 | 27 |
| 24 void scheduleRecalcState(); | 28 void scheduleRecalcState(); |
| 25 | 29 |
| 30 HTMLImportChild* keep(PassOwnPtr<HTMLImportChild>); | |
|
Hajime Morrita
2014/05/28 20:42:34
Let's just append() or add() instead of keep()-ing
| |
| 31 HTMLImportChild* find(const KURL&) const; | |
| 32 | |
| 26 private: | 33 private: |
| 27 explicit HTMLImportTreeRoot(Document*); | 34 explicit HTMLImportTreeRoot(Document*); |
| 28 | 35 |
| 29 void recalcTimerFired(Timer<HTMLImportTreeRoot>*); | 36 void recalcTimerFired(Timer<HTMLImportTreeRoot>*); |
| 30 | 37 |
| 31 Document* m_document; | 38 Document* m_document; |
| 32 Timer<HTMLImportTreeRoot> m_recalcTimer; | 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; | |
| 33 }; | 44 }; |
| 34 | 45 |
| 35 DEFINE_TYPE_CASTS(HTMLImportTreeRoot, HTMLImport, import, import->isRoot(), impo rt.isRoot()); | 46 DEFINE_TYPE_CASTS(HTMLImportTreeRoot, HTMLImport, import, import->isRoot(), impo rt.isRoot()); |
| 36 | 47 |
| 37 } | 48 } |
| 38 | 49 |
| 39 #endif | 50 #endif |
| OLD | NEW |