Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: Source/core/html/imports/HTMLImportTreeRoot.h

Issue 305723004: Make HTMLImportTreeNode own the whole import tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/imports/HTMLImport.h ('k') | Source/core/html/imports/HTMLImportTreeRoot.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImport.h ('k') | Source/core/html/imports/HTMLImportTreeRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698