Index: Source/core/dom/DocumentLifecycle.h |
diff --git a/Source/core/rendering/LayoutIndicator.h b/Source/core/dom/DocumentLifecycle.h |
similarity index 79% |
copy from Source/core/rendering/LayoutIndicator.h |
copy to Source/core/dom/DocumentLifecycle.h |
index 6337da949cffa77681e9e88cfbae87eab70d0208..c3f919635e833a43521a5a7e401602671935c4f6 100644 |
--- a/Source/core/rendering/LayoutIndicator.h |
+++ b/Source/core/dom/DocumentLifecycle.h |
@@ -28,36 +28,36 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef LayoutIndicator_h |
-#define LayoutIndicator_h |
+#ifndef DocumentLifecycle_h |
+#define DocumentLifecycle_h |
-#include "wtf/Assertions.h" |
+#include "wtf/Noncopyable.h" |
namespace WebCore { |
-#ifndef NDEBUG |
- |
-class LayoutIndicator { |
+class DocumentLifecycle { |
+ WTF_MAKE_NONCOPYABLE(DocumentLifecycle); |
public: |
- LayoutIndicator() { ++s_inLayout; } |
- ~LayoutIndicator() { --s_inLayout; } |
+ enum State { |
+ Uninitialized, |
+ Inactive, |
+ Active, |
+ Stopping, |
+ Stopped, |
+ Disposed, |
+ }; |
- static bool inLayout() { return s_inLayout; } |
+ DocumentLifecycle(); |
+ ~DocumentLifecycle(); |
-private: |
- static size_t s_inLayout; |
-}; |
+ State state() const { return m_state; } |
-#else |
+ void advanceTo(State); |
-class LayoutIndicator { |
-public: |
- LayoutIndicator() { } |
- ~LayoutIndicator() { } |
+private: |
+ State m_state; |
}; |
-#endif |
- |
} |
-#endif // LayoutIndicator_h |
+#endif |