OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef FrameViewAutoSizeInfo_h | |
6 #define FrameViewAutoSizeInfo_h | |
7 | |
8 #include "platform/geometry/IntSize.h" | |
9 #include "wtf/FastAllocBase.h" | |
10 #include "wtf/Noncopyable.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class FrameView; | |
15 | |
16 class FrameViewAutoSizeInfo { | |
17 WTF_MAKE_NONCOPYABLE(FrameViewAutoSizeInfo); | |
18 WTF_MAKE_FAST_ALLOCATED; | |
19 | |
20 public: | |
21 FrameViewAutoSizeInfo(FrameView*); | |
22 | |
23 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.
| |
24 void autoSizeIfEnabled(); | |
25 | |
26 private: | |
27 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.
| |
28 | |
29 // If true, automatically resize the frame view around its content. | |
30 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.
| |
31 bool m_inAutoSize; | |
32 // True if autosize has been run since m_shouldAutoSize was set. | |
33 bool m_didRunAutosize; | |
34 // The lower bound on the size when autosizing. | |
35 IntSize m_minAutoSize; | |
36 // The upper bound on the size when autosizing. | |
37 IntSize m_maxAutoSize; | |
38 }; | |
39 | |
40 } // namespace blink | |
41 | |
42 #endif // FrameViewAutoSizeInfo_h | |
OLD | NEW |