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

Unified Diff: ui/aura/window.h

Issue 8273040: Minimum size for aura window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 2 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: ui/aura/window.h
diff --git a/ui/aura/window.h b/ui/aura/window.h
index e7beacc55189cb4148f5c16b9b9480707d92a4cd..b3c384ec47a19785fd825eb190d585fc27fc0a23 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -111,6 +111,11 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
void SetBounds(const gfx::Rect& new_bounds);
const gfx::Rect& bounds() const;
+ // Sets the minimum size of the window that a user can resize to.
Ben Goodger (Google) 2011/10/14 15:40:05 can resize it to.
oshima 2011/10/15 02:10:50 Done.
+ // A smaller size can still be set using SetBounds.
Ben Goodger (Google) 2011/10/14 15:40:05 SetBounds().
oshima 2011/10/15 02:10:50 Done.
+ void SetMinimumSize(const gfx::Size& minimum_size);
Ben Goodger (Google) 2011/10/14 15:40:05 Since this is a pure setter, you can call it set_m
oshima 2011/10/15 02:10:50 Done.
+ const gfx::Size& minimum_size() const { return minimum_size_; }
+
// Marks the a portion of window as needing to be painted.
void SchedulePaintInRect(const gfx::Rect& rect);
@@ -234,6 +239,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
virtual internal::RootWindow* GetRoot();
private:
+ // Changes the bounds of the window without condition.
+ void SetBoundsInternal(const gfx::Rect& new_bounds);
+
// Updates the visible state of the layer, but does not make visible-state
// specific changes. Called from Show()/Hide().
void SetVisible(bool visible);
@@ -271,6 +279,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// The original bounds of a maximized/fullscreen window.
gfx::Rect restore_bounds_;
+ // The minimum size of the window a user can resize to.
+ gfx::Size minimum_size_;
+
scoped_ptr<ui::Layer> layer_;
// The Window's parent.

Powered by Google App Engine
This is Rietveld 408576698