Index: Source/core/frame/FrameViewAutoSizeInfo.h |
diff --git a/Source/core/frame/FrameViewAutoSizeInfo.h b/Source/core/frame/FrameViewAutoSizeInfo.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..237ed0ab6b7d2d37395ee30f8237752b9b11ad27 |
--- /dev/null |
+++ b/Source/core/frame/FrameViewAutoSizeInfo.h |
@@ -0,0 +1,42 @@ |
+// 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 FrameViewAutoSizeInfo_h |
+#define FrameViewAutoSizeInfo_h |
+ |
+#include "platform/geometry/IntSize.h" |
+#include "wtf/FastAllocBase.h" |
+#include "wtf/Noncopyable.h" |
+ |
+namespace blink { |
+ |
+class FrameView; |
+ |
+class FrameViewAutoSizeInfo { |
+ WTF_MAKE_NONCOPYABLE(FrameViewAutoSizeInfo); |
+ WTF_MAKE_FAST_ALLOCATED; |
+ |
+public: |
+ FrameViewAutoSizeInfo(FrameView*); |
+ |
+ void enableAutoSizeMode(bool enable, const IntSize& minSize, const IntSize& maxSize); |
eseidel
2014/08/19 16:31:18
This doesn't need to take a bool, does it?
Shanmuga Pandi
2014/08/20 14:54:12
Done.
|
+ void autoSizeIfEnabled(); |
+ |
+private: |
+ FrameView* m_frameView; |
eseidel
2014/08/19 16:31:18
This can never be null, so might as well make it a
Shanmuga Pandi
2014/08/20 14:54:12
Done.
|
+ |
+ // If true, automatically resize the frame view around its content. |
+ bool m_shouldAutoSize; |
eseidel
2014/08/19 16:31:18
This bool isnt' needed. We could have the presenc
Shanmuga Pandi
2014/08/20 14:54:12
Done.
|
+ bool m_inAutoSize; |
+ // True if autosize has been run since m_shouldAutoSize was set. |
+ bool m_didRunAutosize; |
+ // The lower bound on the size when autosizing. |
+ IntSize m_minAutoSize; |
+ // The upper bound on the size when autosizing. |
+ IntSize m_maxAutoSize; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // FrameViewAutoSizeInfo_h |