Index: sky/engine/core/painting/LayoutRoot.h |
diff --git a/sky/engine/core/painting/LayoutRoot.h b/sky/engine/core/painting/LayoutRoot.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..50a78b7f8b6ed564880e2ad874612e22b6a55d77 |
--- /dev/null |
+++ b/sky/engine/core/painting/LayoutRoot.h |
@@ -0,0 +1,62 @@ |
+// Copyright 2015 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 SKY_ENGINE_CORE_PAINTING_LAYOUTROOT_H_ |
+#define SKY_ENGINE_CORE_PAINTING_LAYOUTROOT_H_ |
+ |
+#include "sky/engine/core/dom/Node.h" |
+#include "sky/engine/core/frame/FrameHost.h" |
+#include "sky/engine/core/painting/Paint.h" |
+#include "sky/engine/core/painting/Picture.h" |
+#include "sky/engine/platform/graphics/DisplayList.h" |
+#include "sky/engine/tonic/dart_wrappable.h" |
+#include "sky/engine/wtf/PassRefPtr.h" |
+#include "sky/engine/wtf/RefCounted.h" |
+ |
+namespace blink { |
+class Element; |
+class Document; |
+class LocalFrame; |
+ |
+class LayoutRoot : public RefCounted<LayoutRoot>, public DartWrappable { |
+ DEFINE_WRAPPERTYPEINFO(); |
+public: |
+ LayoutRoot(); |
+ ~LayoutRoot() override; |
+ |
+ static PassRefPtr<LayoutRoot> create(); |
+ |
+ Element* rootElement() const; |
+ void setRootElement(Element*); |
+ |
+ void layout(); |
+ |
+ LayoutUnit minWidth() const { return m_minWidth; } |
+ void setMinWidth(LayoutUnit width) { m_minWidth = width; } |
+ |
+ LayoutUnit maxWidth() const { return m_maxWidth; } |
+ void setMaxWidth(LayoutUnit width) { m_maxWidth = width; } |
+ |
+ LayoutUnit minHeight() const { return m_minHeight; } |
+ void setMinHeight(LayoutUnit height) { m_minHeight = height; } |
+ |
+ LayoutUnit maxHeight() const { return m_maxHeight; } |
+ void setMaxHeight(LayoutUnit height) { m_maxHeight = height; } |
+ |
+private: |
+ LayoutUnit m_minWidth; |
+ LayoutUnit m_maxWidth; |
+ LayoutUnit m_minHeight; |
+ LayoutUnit m_maxHeight; |
+ RefPtr<Document> m_document; |
+ RefPtr<LocalFrame> m_frame; |
+ |
+ // TODO(eseidel): All of these should be removed: |
+ OwnPtr<Settings> m_settings; |
+ OwnPtr<FrameHost> m_frameHost; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // SKY_ENGINE_CORE_PAINTING_LAYOUTROOT_H_ |