| 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 <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 // HWNDMessageHandler, InputMethodDelegate implementation: | 891 // HWNDMessageHandler, InputMethodDelegate implementation: |
| 892 | 892 |
| 893 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) { | 893 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) { |
| 894 SetMsgHandled(delegate_->HandleKeyEvent(key)); | 894 SetMsgHandled(delegate_->HandleKeyEvent(key)); |
| 895 } | 895 } |
| 896 | 896 |
| 897 //////////////////////////////////////////////////////////////////////////////// | 897 //////////////////////////////////////////////////////////////////////////////// |
| 898 // HWNDMessageHandler, ui::WindowImpl overrides: | 898 // HWNDMessageHandler, ui::WindowImpl overrides: |
| 899 | 899 |
| 900 HICON HWNDMessageHandler::GetDefaultWindowIcon() const { | 900 HICON HWNDMessageHandler::GetDefaultWindowIcon() const { |
| 901 if (use_sytem_default_icon_) |
| 902 return NULL; |
| 901 return ViewsDelegate::views_delegate ? | 903 return ViewsDelegate::views_delegate ? |
| 902 ViewsDelegate::views_delegate->GetDefaultWindowIcon() : NULL; | 904 ViewsDelegate::views_delegate->GetDefaultWindowIcon() : NULL; |
| 903 } | 905 } |
| 904 | 906 |
| 905 LRESULT HWNDMessageHandler::OnWndProc(UINT message, | 907 LRESULT HWNDMessageHandler::OnWndProc(UINT message, |
| 906 WPARAM w_param, | 908 WPARAM w_param, |
| 907 LPARAM l_param) { | 909 LPARAM l_param) { |
| 908 HWND window = hwnd(); | 910 HWND window = hwnd(); |
| 909 LRESULT result = 0; | 911 LRESULT result = 0; |
| 910 | 912 |
| (...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2091 DwmExtendFrameIntoClientArea(hwnd(), &m); | 2093 DwmExtendFrameIntoClientArea(hwnd(), &m); |
| 2092 } | 2094 } |
| 2093 if (window_pos->flags & SWP_SHOWWINDOW) | 2095 if (window_pos->flags & SWP_SHOWWINDOW) |
| 2094 delegate_->HandleVisibilityChanged(true); | 2096 delegate_->HandleVisibilityChanged(true); |
| 2095 else if (window_pos->flags & SWP_HIDEWINDOW) | 2097 else if (window_pos->flags & SWP_HIDEWINDOW) |
| 2096 delegate_->HandleVisibilityChanged(false); | 2098 delegate_->HandleVisibilityChanged(false); |
| 2097 SetMsgHandled(FALSE); | 2099 SetMsgHandled(FALSE); |
| 2098 } | 2100 } |
| 2099 | 2101 |
| 2100 } // namespace views | 2102 } // namespace views |
| OLD | NEW |