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 <wtsapi32.h> | 10 #include <wtsapi32.h> |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 return 0; | 904 return 0; |
905 msg_handled_ = old_msg_handled; | 905 msg_handled_ = old_msg_handled; |
906 | 906 |
907 if (!processed) | 907 if (!processed) |
908 result = DefWindowProc(window, message, w_param, l_param); | 908 result = DefWindowProc(window, message, w_param, l_param); |
909 | 909 |
910 // DefWindowProc() may have destroyed the window in a nested message loop. | 910 // DefWindowProc() may have destroyed the window in a nested message loop. |
911 if (!::IsWindow(window)) | 911 if (!::IsWindow(window)) |
912 return result; | 912 return result; |
913 | 913 |
914 if (delegate_) | 914 if (delegate_) { |
915 delegate_->PostHandleMSG(message, w_param, l_param); | 915 delegate_->PostHandleMSG(message, w_param, l_param); |
916 if (message == WM_NCDESTROY) { | 916 if (message == WM_NCDESTROY) |
917 if (delegate_) | |
918 delegate_->HandleDestroyed(); | 917 delegate_->HandleDestroyed(); |
919 } | 918 } |
920 | 919 |
921 if (message == WM_ACTIVATE && IsTopLevelWindow(window)) | 920 if (message == WM_ACTIVATE && IsTopLevelWindow(window)) |
922 PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param)); | 921 PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param)); |
923 return result; | 922 return result; |
924 } | 923 } |
925 | 924 |
926 LRESULT HWNDMessageHandler::HandleMouseMessage(unsigned int message, | 925 LRESULT HWNDMessageHandler::HandleMouseMessage(unsigned int message, |
927 WPARAM w_param, | 926 WPARAM w_param, |
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2408 POINT cursor_pos = {0}; | 2407 POINT cursor_pos = {0}; |
2409 ::GetCursorPos(&cursor_pos); | 2408 ::GetCursorPos(&cursor_pos); |
2410 if (memcmp(&cursor_pos, &mouse_location, sizeof(POINT))) | 2409 if (memcmp(&cursor_pos, &mouse_location, sizeof(POINT))) |
2411 return false; | 2410 return false; |
2412 return true; | 2411 return true; |
2413 } | 2412 } |
2414 return false; | 2413 return false; |
2415 } | 2414 } |
2416 | 2415 |
2417 } // namespace views | 2416 } // namespace views |
OLD | NEW |