Index: views/widget/native_widget_win.cc |
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc |
index 8d2420ea986206d35a5f56a0e08b1e18084fbd71..0bc65efcabf968d8c004b1dd368cbece0cc59fa2 100644 |
--- a/views/widget/native_widget_win.cc |
+++ b/views/widget/native_widget_win.cc |
@@ -882,6 +882,14 @@ void NativeWidgetWin::Hide() { |
} |
} |
+void NativeWidgetWin::ShowMaximized(const gfx::Rect& restored_bounds) { |
+ WINDOWPLACEMENT placement = { 0 }; |
+ placement.length = sizeof(WINDOWPLACEMENT); |
+ placement.showCmd = SW_SHOWMAXIMIZED; |
+ placement.rcNormalPosition = restored_bounds.ToRECT(); |
+ SetWindowPlacement(hwnd(), &placement); |
+} |
+ |
void NativeWidgetWin::ShowNativeWidget(ShowState state) { |
Ben Goodger (Google)
2011/07/13 23:53:40
OK let's normalize these names.
Show()->Show()
Sh
|
DWORD native_show_state; |
switch (state) { |
@@ -2187,6 +2195,8 @@ void NativeWidgetWin::SetInitParams(const Widget::InitParams& params) { |
// Set type-independent style attributes. |
if (params.child) |
style |= WS_CHILD | WS_VISIBLE; |
+ if (params.maximize) |
+ style |= WS_MAXIMIZE; |
if (!params.accept_events) |
ex_style |= WS_EX_TRANSPARENT; |
if (!params.can_activate) |