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

Unified Diff: Source/core/html/imports/HTMLImportTreeRoot.h

Issue 301803002: Extract tree root responsibility out of HTMLImportsController. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.cpp ('k') | Source/core/html/imports/HTMLImportTreeRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/imports/HTMLImportTreeRoot.h
diff --git a/Source/core/html/imports/HTMLImportTreeRoot.h b/Source/core/html/imports/HTMLImportTreeRoot.h
new file mode 100644
index 0000000000000000000000000000000000000000..e8774a6b82fffcde98e3d509203070a402f130e7
--- /dev/null
+++ b/Source/core/html/imports/HTMLImportTreeRoot.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HTMLImportTreeRoot_h
+#define HTMLImportTreeRoot_h
+
+#include "core/html/imports/HTMLImport.h"
+#include "platform/Timer.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace WebCore {
+
+class HTMLImportTreeRoot : public HTMLImport {
+public:
+ static PassOwnPtr<HTMLImportTreeRoot> create(Document*);
+
+ // HTMLImport
+ virtual Document* document() const OVERRIDE;
+ virtual bool isDone() const OVERRIDE;
+ virtual void stateWillChange() OVERRIDE;
+ virtual void stateDidChange() OVERRIDE;
+
+ void scheduleRecalcState();
+
+private:
+ explicit HTMLImportTreeRoot(Document*);
+
+ void recalcTimerFired(Timer<HTMLImportTreeRoot>*);
+
+ Document* m_document;
+ Timer<HTMLImportTreeRoot> m_recalcTimer;
+};
+
+DEFINE_TYPE_CASTS(HTMLImportTreeRoot, HTMLImport, import, import->isRoot(), import.isRoot());
+
+}
+
+#endif
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.cpp ('k') | Source/core/html/imports/HTMLImportTreeRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698