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..62617b09a92ff267dc6d07e8237b168a81cdc3cd |
--- /dev/null |
+++ b/Source/core/frame/FrameViewAutoSizeInfo.h |
@@ -0,0 +1,43 @@ |
+// 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" |
+#include "wtf/RefPtr.h" |
+ |
+namespace blink { |
+ |
+class FrameView; |
+ |
+class FrameViewAutoSizeInfo { |
+ WTF_MAKE_NONCOPYABLE(FrameViewAutoSizeInfo); |
+ WTF_MAKE_FAST_ALLOCATED; |
+ |
+public: |
+ FrameViewAutoSizeInfo(FrameView*); |
+ ~FrameViewAutoSizeInfo(); |
+ void configureAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); |
+ void autoSizeIfNeeded(); |
+ |
+private: |
+ void removeAutoSizeMode(); |
+ |
+ RefPtr<FrameView> m_frameView; |
+ |
+ 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 |