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

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: Rebased 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
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..237ed0ab6b7d2d37395ee30f8237752b9b11ad27
--- /dev/null
+++ b/Source/core/frame/FrameViewAutoSizeInfo.h
@@ -0,0 +1,42 @@
+// 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"
+
+namespace blink {
+
+class FrameView;
+
+class FrameViewAutoSizeInfo {
+ WTF_MAKE_NONCOPYABLE(FrameViewAutoSizeInfo);
+ WTF_MAKE_FAST_ALLOCATED;
+
+public:
+ FrameViewAutoSizeInfo(FrameView*);
+
+ 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.
+ void autoSizeIfEnabled();
+
+private:
+ 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.
+
+ // If true, automatically resize the frame view around its content.
+ 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.
+ 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

Powered by Google App Engine
This is Rietveld 408576698