1 // Copyright 2014 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.
5 #ifndef FrameViewAutoSizeInfo_h
6 #define FrameViewAutoSizeInfo_h
8 #include "platform/geometry/IntSize.h"
9 #include "wtf/FastAllocBase.h"
10 #include "wtf/Noncopyable.h"
11 #include "wtf/RefPtr.h"
17 class FrameViewAutoSizeInfo {
18 WTF_MAKE_NONCOPYABLE(FrameViewAutoSizeInfo);
19 WTF_MAKE_FAST_ALLOCATED;
22 FrameViewAutoSizeInfo(FrameView*);
23 ~FrameViewAutoSizeInfo();
24 void configureAutoSizeMode(const IntSize& minSize, const IntSize& maxSize);
25 void autoSizeIfNeeded();
28 void removeAutoSizeMode();
30 RefPtr<FrameView> m_frameView;
33 // True if autosize has been run since m_shouldAutoSize was set.
34 bool m_didRunAutosize;
35 // The lower bound on the size when autosizing.
36 IntSize m_minAutoSize;
37 // The upper bound on the size when autosizing.
38 IntSize m_maxAutoSize;
43 #endif // FrameViewAutoSizeInfo_h