Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: Source/core/frame/FrameViewAutoSizeInfo.h

Issue 459633002: Autosizing storage doesnot belong on FrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Aligned with review comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/FrameViewAutoSizeInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/FrameViewAutoSizeInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698