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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 | 898 |
899 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) { | 899 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) { |
900 SetMsgHandled(delegate_->HandleKeyEvent(key)); | 900 SetMsgHandled(delegate_->HandleKeyEvent(key)); |
901 } | 901 } |
902 | 902 |
903 //////////////////////////////////////////////////////////////////////////////// | 903 //////////////////////////////////////////////////////////////////////////////// |
904 // HWNDMessageHandler, gfx::WindowImpl overrides: | 904 // HWNDMessageHandler, gfx::WindowImpl overrides: |
905 | 905 |
906 HICON HWNDMessageHandler::GetDefaultWindowIcon() const { | 906 HICON HWNDMessageHandler::GetDefaultWindowIcon() const { |
907 if (use_system_default_icon_) | 907 if (use_system_default_icon_) |
908 return nullptr; | 908 return NULL; |
909 return ViewsDelegate::views_delegate ? | 909 return ViewsDelegate::views_delegate ? |
910 ViewsDelegate::views_delegate->GetDefaultWindowIcon() : nullptr; | 910 ViewsDelegate::views_delegate->GetDefaultWindowIcon() : NULL; |
911 } | |
912 | |
913 HICON HWNDMessageHandler::GetSmallWindowIcon() const { | |
914 if (use_system_default_icon_) | |
915 return nullptr; | |
916 return ViewsDelegate::views_delegate ? | |
917 ViewsDelegate::views_delegate->GetSmallWindowIcon() : nullptr; | |
918 } | 911 } |
919 | 912 |
920 LRESULT HWNDMessageHandler::OnWndProc(UINT message, | 913 LRESULT HWNDMessageHandler::OnWndProc(UINT message, |
921 WPARAM w_param, | 914 WPARAM w_param, |
922 LPARAM l_param) { | 915 LPARAM l_param) { |
923 HWND window = hwnd(); | 916 HWND window = hwnd(); |
924 LRESULT result = 0; | 917 LRESULT result = 0; |
925 | 918 |
926 if (delegate_ && delegate_->PreHandleMSG(message, w_param, l_param, &result)) | 919 if (delegate_ && delegate_->PreHandleMSG(message, w_param, l_param, &result)) |
927 return result; | 920 return result; |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); | 2497 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); |
2505 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); | 2498 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); |
2506 } | 2499 } |
2507 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want | 2500 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want |
2508 // to notify our children too, since we can have MDI child windows who need to | 2501 // to notify our children too, since we can have MDI child windows who need to |
2509 // update their appearance. | 2502 // update their appearance. |
2510 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); | 2503 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); |
2511 } | 2504 } |
2512 | 2505 |
2513 } // namespace views | 2506 } // namespace views |
OLD | NEW |