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

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: addressd comment 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
« no previous file with comments | « ui/aura/toplevel_window_event_filter_unittest.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.h
diff --git a/ui/aura/window.h b/ui/aura/window.h
index 57c52be635c33c4014dfcb6a3ace9ff7c20c7907..e946244cefe2a43712bc52171bc21203ea146e69 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -123,6 +123,13 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// Changes the bounds of the window.
void SetBounds(const gfx::Rect& new_bounds);
+ // Sets the minimum size of the window that a user can resize it to.
+ // A smaller size can still be set using SetBounds().
+ void set_minimum_size(const gfx::Size& minimum_size) {
+ minimum_size_ = minimum_size;
+ }
+ 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);
@@ -244,6 +251,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);
@@ -281,6 +291,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.
« no previous file with comments | « ui/aura/toplevel_window_event_filter_unittest.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698