| 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/widget/native_widget_win.h" | 5 #include "ui/views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2218 if (window_pos->flags & SWP_SHOWWINDOW) | 2218 if (window_pos->flags & SWP_SHOWWINDOW) |
| 2219 delegate_->OnNativeWidgetVisibilityChanged(true); | 2219 delegate_->OnNativeWidgetVisibilityChanged(true); |
| 2220 else if (window_pos->flags & SWP_HIDEWINDOW) | 2220 else if (window_pos->flags & SWP_HIDEWINDOW) |
| 2221 delegate_->OnNativeWidgetVisibilityChanged(false); | 2221 delegate_->OnNativeWidgetVisibilityChanged(false); |
| 2222 SetMsgHandled(FALSE); | 2222 SetMsgHandled(FALSE); |
| 2223 } | 2223 } |
| 2224 | 2224 |
| 2225 void NativeWidgetWin::OnFinalMessage(HWND window) { | 2225 void NativeWidgetWin::OnFinalMessage(HWND window) { |
| 2226 // We don't destroy props in WM_DESTROY as we may still get messages after | 2226 // We don't destroy props in WM_DESTROY as we may still get messages after |
| 2227 // WM_DESTROY that assume the properties are still valid (such as WM_CLOSE). | 2227 // WM_DESTROY that assume the properties are still valid (such as WM_CLOSE). |
| 2228 props_.reset(); | 2228 props_.clear(); |
| 2229 delegate_->OnNativeWidgetDestroyed(); | 2229 delegate_->OnNativeWidgetDestroyed(); |
| 2230 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) | 2230 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) |
| 2231 delete this; | 2231 delete this; |
| 2232 } | 2232 } |
| 2233 | 2233 |
| 2234 //////////////////////////////////////////////////////////////////////////////// | 2234 //////////////////////////////////////////////////////////////////////////////// |
| 2235 // NativeWidgetWin, protected: | 2235 // NativeWidgetWin, protected: |
| 2236 | 2236 |
| 2237 int NativeWidgetWin::GetShowState() const { | 2237 int NativeWidgetWin::GetShowState() const { |
| 2238 return SW_SHOWNORMAL; | 2238 return SW_SHOWNORMAL; |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2767 // static | 2767 // static |
| 2768 bool NativeWidgetPrivate::IsTouchDown() { | 2768 bool NativeWidgetPrivate::IsTouchDown() { |
| 2769 // This currently isn't necessary because we're not generating touch events on | 2769 // This currently isn't necessary because we're not generating touch events on |
| 2770 // windows. When we do, this will need to be updated. | 2770 // windows. When we do, this will need to be updated. |
| 2771 return false; | 2771 return false; |
| 2772 } | 2772 } |
| 2773 | 2773 |
| 2774 } // namespace internal | 2774 } // namespace internal |
| 2775 | 2775 |
| 2776 } // namespace views | 2776 } // namespace views |
| OLD | NEW |