| Index: ui/views/win/hwnd_message_handler.cc
|
| diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
| index f14b93d313c3b8716a2df2709771b2b0d8556b20..36003484d16703d33691bc9b308f4757446edc9f 100644
|
| --- a/ui/views/win/hwnd_message_handler.cc
|
| +++ b/ui/views/win/hwnd_message_handler.cc
|
| @@ -868,6 +868,23 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
| PerformDwmTransition();
|
| }
|
|
|
| +void HWNDMessageHandler::SizeConstraintsChanged() {
|
| + LONG style = GetWindowLong(hwnd(), GWL_STYLE);
|
| + if (delegate_->CanResize()) {
|
| + style |= WS_THICKFRAME | WS_MAXIMIZEBOX;
|
| + if (!delegate_->CanMaximize())
|
| + style &= ~WS_MAXIMIZEBOX;
|
| + } else {
|
| + style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX);
|
| + }
|
| + if (delegate_->CanMinimize()) {
|
| + style |= WS_MINIMIZEBOX;
|
| + } else {
|
| + style &= ~WS_MINIMIZEBOX;
|
| + }
|
| + SetWindowLong(hwnd(), GWL_STYLE, style);
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // HWNDMessageHandler, InputMethodDelegate implementation:
|
|
|
|
|