| 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 | 10 |
| (...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 WPARAM w_param, | 1609 WPARAM w_param, |
| 1610 LPARAM l_param) { | 1610 LPARAM l_param) { |
| 1611 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. | 1611 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. |
| 1612 tracked_objects::ScopedTracker tracking_profile( | 1612 tracked_objects::ScopedTracker tracking_profile( |
| 1613 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1613 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1614 "440919 HWNDMessageHandler::OnKeyEvent")); | 1614 "440919 HWNDMessageHandler::OnKeyEvent")); |
| 1615 | 1615 |
| 1616 MSG msg = { | 1616 MSG msg = { |
| 1617 hwnd(), message, w_param, l_param, static_cast<DWORD>(GetMessageTime())}; | 1617 hwnd(), message, w_param, l_param, static_cast<DWORD>(GetMessageTime())}; |
| 1618 ui::KeyEvent key(msg); | 1618 ui::KeyEvent key(msg); |
| 1619 if (!delegate_->HandleUntranslatedKeyEvent(key)) | 1619 delegate_->HandleKeyEvent(&key); |
| 1620 if (!key.handled()) |
| 1620 SetMsgHandled(FALSE); | 1621 SetMsgHandled(FALSE); |
| 1621 return 0; | 1622 return 0; |
| 1622 } | 1623 } |
| 1623 | 1624 |
| 1624 void HWNDMessageHandler::OnKillFocus(HWND focused_window) { | 1625 void HWNDMessageHandler::OnKillFocus(HWND focused_window) { |
| 1625 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. | 1626 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. |
| 1626 tracked_objects::ScopedTracker tracking_profile( | 1627 tracked_objects::ScopedTracker tracking_profile( |
| 1627 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1628 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1628 "440919 HWNDMessageHandler::OnKillFocus")); | 1629 "440919 HWNDMessageHandler::OnKillFocus")); |
| 1629 | 1630 |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2739 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); | 2740 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); |
| 2740 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); | 2741 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); |
| 2741 } | 2742 } |
| 2742 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want | 2743 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want |
| 2743 // to notify our children too, since we can have MDI child windows who need to | 2744 // to notify our children too, since we can have MDI child windows who need to |
| 2744 // update their appearance. | 2745 // update their appearance. |
| 2745 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); | 2746 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); |
| 2746 } | 2747 } |
| 2747 | 2748 |
| 2748 } // namespace views | 2749 } // namespace views |
| OLD | NEW |