| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/win/hwnd_message_handler.h" | 5 #include "ui/views/win/hwnd_message_handler.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 void HWNDMessageHandler::OnWindowPosChanged(WINDOWPOS* window_pos) { | 2098 void HWNDMessageHandler::OnWindowPosChanged(WINDOWPOS* window_pos) { |
| 2099 if (DidClientAreaSizeChange(window_pos)) | 2099 if (DidClientAreaSizeChange(window_pos)) |
| 2100 ClientAreaSizeChanged(); | 2100 ClientAreaSizeChanged(); |
| 2101 if (remove_standard_frame_ && window_pos->flags & SWP_FRAMECHANGED && | 2101 if (remove_standard_frame_ && window_pos->flags & SWP_FRAMECHANGED && |
| 2102 ui::win::IsAeroGlassEnabled()) { | 2102 ui::win::IsAeroGlassEnabled()) { |
| 2103 MARGINS m = {10, 10, 10, 10}; | 2103 MARGINS m = {10, 10, 10, 10}; |
| 2104 DwmExtendFrameIntoClientArea(hwnd(), &m); | 2104 DwmExtendFrameIntoClientArea(hwnd(), &m); |
| 2105 } | 2105 } |
| 2106 if (window_pos->flags & SWP_SHOWWINDOW) | |
| 2107 delegate_->HandleVisibilityChanged(true); | |
| 2108 else if (window_pos->flags & SWP_HIDEWINDOW) | 2106 else if (window_pos->flags & SWP_HIDEWINDOW) |
| 2109 delegate_->HandleVisibilityChanged(false); | 2107 delegate_->HandleVisibilityChanged(false); |
| 2110 SetMsgHandled(FALSE); | 2108 SetMsgHandled(FALSE); |
| 2111 } | 2109 } |
| 2112 | 2110 |
| 2111 void HWNDMessageHandler::OnShowWindow(BOOL visible, int lparam) { |
| 2112 if (visible) |
| 2113 delegate_->HandleVisibilityChanged(true); |
| 2114 SetMsgHandled(FALSE); |
| 2115 } |
| 2116 |
| 2113 } // namespace views | 2117 } // namespace views |
| OLD | NEW |