| 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 blink { | 12 namespace blink { | 
| 13 | 13 | 
| 14 class HTMLImportChild; | 14 class HTMLImportChild; | 
| 15 class KURL; | 15 class KURL; | 
| 16 | 16 | 
| 17 class HTMLImportTreeRoot : public HTMLImport { | 17 class HTMLImportTreeRoot : public HTMLImport { | 
| 18 public: | 18 public: | 
| 19     static PassOwnPtrWillBeRawPtr<HTMLImportTreeRoot> create(Document*); | 19     static PassOwnPtrWillBeRawPtr<HTMLImportTreeRoot> create(Document*); | 
| 20 | 20 | 
| 21     virtual ~HTMLImportTreeRoot(); | 21     virtual ~HTMLImportTreeRoot(); | 
| 22     void dispose(); | 22     void dispose(); | 
| 23 | 23 | 
| 24     // HTMLImport | 24     // HTMLImport | 
| 25     virtual Document* document() const override; | 25     virtual Document* document() const override; | 
| 26     virtual bool isDone() const override; | 26     virtual bool hasFinishedLoading() const override; | 
| 27     virtual void stateWillChange() override; | 27     virtual void stateWillChange() override; | 
| 28     virtual void stateDidChange() override; | 28     virtual void stateDidChange() override; | 
| 29 | 29 | 
| 30     void scheduleRecalcState(); | 30     void scheduleRecalcState(); | 
| 31 | 31 | 
| 32     HTMLImportChild* add(PassOwnPtrWillBeRawPtr<HTMLImportChild>); | 32     HTMLImportChild* add(PassOwnPtrWillBeRawPtr<HTMLImportChild>); | 
| 33     HTMLImportChild* find(const KURL&) const; | 33     HTMLImportChild* find(const KURL&) const; | 
| 34 | 34 | 
| 35     DECLARE_VIRTUAL_TRACE(); | 35     DECLARE_VIRTUAL_TRACE(); | 
| 36 | 36 | 
| 37 private: | 37 private: | 
| 38     explicit HTMLImportTreeRoot(Document*); | 38     explicit HTMLImportTreeRoot(Document*); | 
| 39 | 39 | 
| 40     void recalcTimerFired(Timer<HTMLImportTreeRoot>*); | 40     void recalcTimerFired(Timer<HTMLImportTreeRoot>*); | 
| 41 | 41 | 
| 42     RawPtrWillBeMember<Document> m_document; | 42     RawPtrWillBeMember<Document> m_document; | 
| 43     Timer<HTMLImportTreeRoot> m_recalcTimer; | 43     Timer<HTMLImportTreeRoot> m_recalcTimer; | 
| 44 | 44 | 
| 45     // List of import which has been loaded or being loaded. | 45     // List of import which has been loaded or being loaded. | 
| 46     typedef WillBeHeapVector<OwnPtrWillBeMember<HTMLImportChild>> ImportList; | 46     typedef WillBeHeapVector<OwnPtrWillBeMember<HTMLImportChild>> ImportList; | 
| 47     ImportList m_imports; | 47     ImportList m_imports; | 
| 48 }; | 48 }; | 
| 49 | 49 | 
| 50 DEFINE_TYPE_CASTS(HTMLImportTreeRoot, HTMLImport, import, import->isRoot(), impo
    rt.isRoot()); | 50 DEFINE_TYPE_CASTS(HTMLImportTreeRoot, HTMLImport, import, import->isRoot(), impo
    rt.isRoot()); | 
| 51 | 51 | 
| 52 } | 52 } | 
| 53 | 53 | 
| 54 #endif | 54 #endif | 
| OLD | NEW | 
|---|