| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef FrameViewAutoSizeInfo_h | 5 #ifndef FrameViewAutoSizeInfo_h |
| 6 #define FrameViewAutoSizeInfo_h | 6 #define FrameViewAutoSizeInfo_h |
| 7 | 7 |
| 8 #include "platform/geometry/IntSize.h" | 8 #include "platform/geometry/IntSize.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/FastAllocBase.h" | 10 #include "wtf/FastAllocBase.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(FrameViewAutoSizeInfo); | 21 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(FrameViewAutoSizeInfo); |
| 22 public: | 22 public: |
| 23 static PassOwnPtrWillBeRawPtr<FrameViewAutoSizeInfo> create(FrameView* frame
View) | 23 static PassOwnPtrWillBeRawPtr<FrameViewAutoSizeInfo> create(FrameView* frame
View) |
| 24 { | 24 { |
| 25 return adoptPtrWillBeNoop(new FrameViewAutoSizeInfo(frameView)); | 25 return adoptPtrWillBeNoop(new FrameViewAutoSizeInfo(frameView)); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void configureAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); | 28 void configureAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); |
| 29 void autoSizeIfNeeded(); | 29 void autoSizeIfNeeded(); |
| 30 | 30 |
| 31 void trace(Visitor*); | 31 DECLARE_TRACE(); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 explicit FrameViewAutoSizeInfo(FrameView*); | 34 explicit FrameViewAutoSizeInfo(FrameView*); |
| 35 | 35 |
| 36 RefPtrWillBeMember<FrameView> m_frameView; | 36 RefPtrWillBeMember<FrameView> m_frameView; |
| 37 | 37 |
| 38 // The lower bound on the size when autosizing. | 38 // The lower bound on the size when autosizing. |
| 39 IntSize m_minAutoSize; | 39 IntSize m_minAutoSize; |
| 40 // The upper bound on the size when autosizing. | 40 // The upper bound on the size when autosizing. |
| 41 IntSize m_maxAutoSize; | 41 IntSize m_maxAutoSize; |
| 42 | 42 |
| 43 bool m_inAutoSize; | 43 bool m_inAutoSize; |
| 44 // True if autosize has been run since m_shouldAutoSize was set. | 44 // True if autosize has been run since m_shouldAutoSize was set. |
| 45 bool m_didRunAutosize; | 45 bool m_didRunAutosize; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace blink | 48 } // namespace blink |
| 49 | 49 |
| 50 #endif // FrameViewAutoSizeInfo_h | 50 #endif // FrameViewAutoSizeInfo_h |
| OLD | NEW |