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

Unified Diff: views/widget/widget.h

Issue 7358005: Makes sure widget is created at right size before showing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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: views/widget/widget.h
diff --git a/views/widget/widget.h b/views/widget/widget.h
index 16d2d7a5e95b0eb81ad5cd83294ef2c4e2f93509..d6001378feb1e17bce160c40fc5f0ac3181dae18 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -134,6 +134,8 @@ class Widget : public internal::NativeWidgetDelegate,
Ownership ownership;
bool mirror_origin_in_rtl;
bool has_dropshadow;
+ // This is set internally by Widget from the delegate.
+ bool maximize;
// Should the widget be double buffered? Default is false.
bool double_buffer;
gfx::NativeView parent;
@@ -591,6 +593,10 @@ class Widget : public internal::NativeWidgetDelegate,
// Sizes and positions the window just after it is created.
void SetInitialBounds(const gfx::Rect& bounds);
+ // Returns the bounds and maximized state from the delegate. Returns true if
+ // the delegate wants to use a specified bounds.
+ bool GetSavedBounds(gfx::Rect* bounds, bool* maximize);
+
internal::NativeWidgetPrivate* native_widget_;
// Non-owned pointer to the Widget's delegate. May be NULL if no delegate is
@@ -645,6 +651,10 @@ class Widget : public internal::NativeWidgetDelegate,
// that explains why we save this.
bool saved_maximized_state_;
+ // The restored bounds used for the initial show. This is only used if
+ // |saved_maximized_state_| is true.
+ gfx::Rect initial_restored_bounds_;
+
// The smallest size the window can be.
gfx::Size minimum_size_;

Powered by Google App Engine
This is Rietveld 408576698