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 <oleacc.h> | 8 #include <oleacc.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #include <tchar.h> | 10 #include <tchar.h> |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 if (!processed) { | 904 if (!processed) { |
905 result = DefWindowProc(window, message, w_param, l_param); | 905 result = DefWindowProc(window, message, w_param, l_param); |
906 // DefWindowProc() may have destroyed the window and/or us in a nested | 906 // DefWindowProc() may have destroyed the window and/or us in a nested |
907 // message loop. | 907 // message loop. |
908 if (!ref || !::IsWindow(window)) | 908 if (!ref || !::IsWindow(window)) |
909 return result; | 909 return result; |
910 } | 910 } |
911 | 911 |
912 if (delegate_) { | 912 if (delegate_) { |
913 delegate_->PostHandleMSG(message, w_param, l_param); | 913 delegate_->PostHandleMSG(message, w_param, l_param); |
914 if (message == WM_NCDESTROY) | 914 if (message == WM_NCDESTROY) { |
| 915 RestoreEnabledIfNecessary(); |
915 delegate_->HandleDestroyed(); | 916 delegate_->HandleDestroyed(); |
| 917 } |
916 } | 918 } |
917 | 919 |
918 if (message == WM_ACTIVATE && IsTopLevelWindow(window)) | 920 if (message == WM_ACTIVATE && IsTopLevelWindow(window)) |
919 PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param), | 921 PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param), |
920 reinterpret_cast<HWND>(l_param)); | 922 reinterpret_cast<HWND>(l_param)); |
921 return result; | 923 return result; |
922 } | 924 } |
923 | 925 |
924 LRESULT HWNDMessageHandler::HandleMouseMessage(unsigned int message, | 926 LRESULT HWNDMessageHandler::HandleMouseMessage(unsigned int message, |
925 WPARAM w_param, | 927 WPARAM w_param, |
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 MONITORINFO monitor_info = {sizeof(monitor_info)}; | 2740 MONITORINFO monitor_info = {sizeof(monitor_info)}; |
2739 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), | 2741 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), |
2740 &monitor_info); | 2742 &monitor_info); |
2741 gfx::Rect shrunk_rect(monitor_info.rcMonitor); | 2743 gfx::Rect shrunk_rect(monitor_info.rcMonitor); |
2742 shrunk_rect.set_height(shrunk_rect.height() - 1); | 2744 shrunk_rect.set_height(shrunk_rect.height() - 1); |
2743 background_fullscreen_hack_ = true; | 2745 background_fullscreen_hack_ = true; |
2744 SetBoundsInternal(shrunk_rect, false); | 2746 SetBoundsInternal(shrunk_rect, false); |
2745 } | 2747 } |
2746 | 2748 |
2747 } // namespace views | 2749 } // namespace views |
OLD | NEW |