OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SKY_ENGINE_CORE_PAINTING_LAYOUTROOT_H_ |
| 6 #define SKY_ENGINE_CORE_PAINTING_LAYOUTROOT_H_ |
| 7 |
| 8 #include "sky/engine/core/dom/Node.h" |
| 9 #include "sky/engine/core/frame/FrameHost.h" |
| 10 #include "sky/engine/core/painting/Paint.h" |
| 11 #include "sky/engine/core/painting/Picture.h" |
| 12 #include "sky/engine/platform/graphics/DisplayList.h" |
| 13 #include "sky/engine/tonic/dart_wrappable.h" |
| 14 #include "sky/engine/wtf/PassRefPtr.h" |
| 15 #include "sky/engine/wtf/RefCounted.h" |
| 16 |
| 17 namespace blink { |
| 18 class Element; |
| 19 class Document; |
| 20 class LocalFrame; |
| 21 |
| 22 class LayoutRoot : public RefCounted<LayoutRoot>, public DartWrappable { |
| 23 DEFINE_WRAPPERTYPEINFO(); |
| 24 public: |
| 25 LayoutRoot(); |
| 26 ~LayoutRoot() override; |
| 27 |
| 28 static PassRefPtr<LayoutRoot> create(); |
| 29 |
| 30 Element* rootElement() const; |
| 31 void setRootElement(Element*); |
| 32 |
| 33 void layout(); |
| 34 |
| 35 LayoutUnit minWidth() const { return m_minWidth; } |
| 36 void setMinWidth(LayoutUnit width) { m_minWidth = width; } |
| 37 |
| 38 LayoutUnit maxWidth() const { return m_maxWidth; } |
| 39 void setMaxWidth(LayoutUnit width) { m_maxWidth = width; } |
| 40 |
| 41 LayoutUnit minHeight() const { return m_minHeight; } |
| 42 void setMinHeight(LayoutUnit height) { m_minHeight = height; } |
| 43 |
| 44 LayoutUnit maxHeight() const { return m_maxHeight; } |
| 45 void setMaxHeight(LayoutUnit height) { m_maxHeight = height; } |
| 46 |
| 47 private: |
| 48 LayoutUnit m_minWidth; |
| 49 LayoutUnit m_maxWidth; |
| 50 LayoutUnit m_minHeight; |
| 51 LayoutUnit m_maxHeight; |
| 52 RefPtr<Document> m_document; |
| 53 RefPtr<LocalFrame> m_frame; |
| 54 |
| 55 // TODO(eseidel): All of these should be removed: |
| 56 OwnPtr<Settings> m_settings; |
| 57 OwnPtr<FrameHost> m_frameHost; |
| 58 }; |
| 59 |
| 60 } // namespace blink |
| 61 |
| 62 #endif // SKY_ENGINE_CORE_PAINTING_LAYOUTROOT_H_ |
OLD | NEW |