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

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: Fix comment 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 aea6ff9ed235f9725bcb6857ba1ca9083539c148..7e7b2df22b90ffa76a1cc196af366d6b51dd5bc6 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -143,6 +143,8 @@ class Widget : public internal::NativeWidgetDelegate,
Ownership ownership;
bool mirror_origin_in_rtl;
bool has_dropshadow;
+ // Whether the widget should be maximized.
+ bool maximize;
// Should the widget be double buffered? Default is false.
bool double_buffer;
gfx::NativeView parent;
@@ -617,6 +619,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_;
ObserverList<Observer> observers_;
@@ -673,6 +679,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