| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 | 906 |
| 907 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) { | 907 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) { |
| 908 SetMsgHandled(delegate_->HandleKeyEvent(key)); | 908 SetMsgHandled(delegate_->HandleKeyEvent(key)); |
| 909 } | 909 } |
| 910 | 910 |
| 911 //////////////////////////////////////////////////////////////////////////////// | 911 //////////////////////////////////////////////////////////////////////////////// |
| 912 // HWNDMessageHandler, gfx::WindowImpl overrides: | 912 // HWNDMessageHandler, gfx::WindowImpl overrides: |
| 913 | 913 |
| 914 HICON HWNDMessageHandler::GetDefaultWindowIcon() const { | 914 HICON HWNDMessageHandler::GetDefaultWindowIcon() const { |
| 915 if (use_system_default_icon_) | 915 if (use_system_default_icon_) |
| 916 return NULL; | 916 return nullptr; |
| 917 return ViewsDelegate::views_delegate ? | 917 return ViewsDelegate::views_delegate ? |
| 918 ViewsDelegate::views_delegate->GetDefaultWindowIcon() : NULL; | 918 ViewsDelegate::views_delegate->GetDefaultWindowIcon() : nullptr; |
| 919 } |
| 920 |
| 921 HICON HWNDMessageHandler::GetSmallWindowIcon() const { |
| 922 if (use_system_default_icon_) |
| 923 return nullptr; |
| 924 return ViewsDelegate::views_delegate ? |
| 925 ViewsDelegate::views_delegate->GetSmallWindowIcon() : nullptr; |
| 919 } | 926 } |
| 920 | 927 |
| 921 LRESULT HWNDMessageHandler::OnWndProc(UINT message, | 928 LRESULT HWNDMessageHandler::OnWndProc(UINT message, |
| 922 WPARAM w_param, | 929 WPARAM w_param, |
| 923 LPARAM l_param) { | 930 LPARAM l_param) { |
| 924 HWND window = hwnd(); | 931 HWND window = hwnd(); |
| 925 LRESULT result = 0; | 932 LRESULT result = 0; |
| 926 | 933 |
| 927 if (delegate_ && delegate_->PreHandleMSG(message, w_param, l_param, &result)) | 934 if (delegate_ && delegate_->PreHandleMSG(message, w_param, l_param, &result)) |
| 928 return result; | 935 return result; |
| (...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2512 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); | 2519 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); |
| 2513 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); | 2520 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); |
| 2514 } | 2521 } |
| 2515 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want | 2522 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want |
| 2516 // to notify our children too, since we can have MDI child windows who need to | 2523 // to notify our children too, since we can have MDI child windows who need to |
| 2517 // update their appearance. | 2524 // update their appearance. |
| 2518 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); | 2525 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); |
| 2519 } | 2526 } |
| 2520 | 2527 |
| 2521 } // namespace views | 2528 } // namespace views |
| OLD | NEW |