Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 881163002: Fix a crash which occurs due to a CHECK firing in the HWNDMessageHandler::OnKeyEvent code path on W… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/widget/widget_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 LRESULT ret = HandleMouseEventInternal(message, w_param, l_param, false); 1002 LRESULT ret = HandleMouseEventInternal(message, w_param, l_param, false);
1003 *handled = IsMsgHandled(); 1003 *handled = IsMsgHandled();
1004 return ret; 1004 return ret;
1005 } 1005 }
1006 1006
1007 LRESULT HWNDMessageHandler::HandleKeyboardMessage(unsigned int message, 1007 LRESULT HWNDMessageHandler::HandleKeyboardMessage(unsigned int message,
1008 WPARAM w_param, 1008 WPARAM w_param,
1009 LPARAM l_param, 1009 LPARAM l_param,
1010 bool* handled) { 1010 bool* handled) {
1011 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr()); 1011 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr());
1012 LRESULT ret = OnKeyEvent(message, w_param, l_param); 1012 LRESULT ret = 0;
1013 if ((message == WM_CHAR) || (message == WM_SYSCHAR))
sky 2015/01/28 20:08:23 Isn't it possible for HandleKeyboardMessage to be
ananta 2015/01/28 20:27:42 I don't think we need to special case here. All k
1014 ret = OnImeMessages(message, w_param, l_param);
1015 else
1016 ret = OnKeyEvent(message, w_param, l_param);
1013 *handled = IsMsgHandled(); 1017 *handled = IsMsgHandled();
1014 return ret; 1018 return ret;
1015 } 1019 }
1016 1020
1017 LRESULT HWNDMessageHandler::HandleTouchMessage(unsigned int message, 1021 LRESULT HWNDMessageHandler::HandleTouchMessage(unsigned int message,
1018 WPARAM w_param, 1022 WPARAM w_param,
1019 LPARAM l_param, 1023 LPARAM l_param,
1020 bool* handled) { 1024 bool* handled) {
1021 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr()); 1025 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr());
1022 LRESULT ret = OnTouchEvent(message, w_param, l_param); 1026 LRESULT ret = OnTouchEvent(message, w_param, l_param);
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2835 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); 2839 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW);
2836 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); 2840 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW);
2837 } 2841 }
2838 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want 2842 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want
2839 // to notify our children too, since we can have MDI child windows who need to 2843 // to notify our children too, since we can have MDI child windows who need to
2840 // update their appearance. 2844 // update their appearance.
2841 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); 2845 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL);
2842 } 2846 }
2843 2847
2844 } // namespace views 2848 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698