| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/desktop_host_win.h" | 5 #include "ui/aura/desktop_host_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 SetMsgHandled(handled); | 251 SetMsgHandled(handled); |
| 252 return 0; | 252 return 0; |
| 253 } | 253 } |
| 254 | 254 |
| 255 void DesktopHostWin::OnPaint(HDC dc) { | 255 void DesktopHostWin::OnPaint(HDC dc) { |
| 256 desktop_->Draw(); | 256 desktop_->Draw(); |
| 257 ValidateRect(hwnd(), NULL); | 257 ValidateRect(hwnd(), NULL); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void DesktopHostWin::OnSize(UINT param, const CSize& size) { | 260 void DesktopHostWin::OnSize(UINT param, const CSize& size) { |
| 261 desktop_->OnHostResized(gfx::Size(size.cx, size.cy)); | 261 // Minimizing resizes the window to 0x0 which causes our layout to go all |
| 262 // screwy, so we just ignore it. |
| 263 if (param != SIZE_MINIMIZED) |
| 264 desktop_->OnHostResized(gfx::Size(size.cx, size.cy)); |
| 262 } | 265 } |
| 263 | 266 |
| 264 } // namespace aura | 267 } // namespace aura |
| OLD | NEW |