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