summaryrefslogtreecommitdiffstats
path: root/ui/platform_window/win
diff options
context:
space:
mode:
authorkpschoedel@chromium.org <kpschoedel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 17:10:17 +0000
committerkpschoedel@chromium.org <kpschoedel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 17:10:17 +0000
commit947211d035a701096dfd2641c14c348b897ee8f4 (patch)
tree24749f5a778bf736ca9758a8f6fddebaadb36b09 /ui/platform_window/win
parent7225f8584c2672e7ea20514f6f79dfe42aa670e9 (diff)
downloadchromium_src-947211d035a701096dfd2641c14c348b897ee8f4.zip
chromium_src-947211d035a701096dfd2641c14c348b897ee8f4.tar.gz
chromium_src-947211d035a701096dfd2641c14c348b897ee8f4.tar.bz2
Distinguish between keystroke and character events.
As described in its class comment, a ui::KeyEvent can be either of two distinct kinds. When constructing a ui::KeyEvent from a native event, the distinction is made by a new IsCharFromNative() call, in the same way that other ui::Event properties are determined, instead of having the caller inspect the native event itself. Removing the redundant |is_char| parameter from constructors also prevent accidental synthetic `mixed' events that consuming code does not handle. Incidentally, while KeyEvent constructor calls are being touched, use EF_NONE instead of 0 to make that argument's purpose clear. BUG=380349 TEST=unit_tests,ash_unittests,events_unittests,ui_unittests,interactive_ui_tests Review URL: https://codereview.chromium.org/404203003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/platform_window/win')
-rw-r--r--ui/platform_window/win/win_window.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/platform_window/win/win_window.cc b/ui/platform_window/win/win_window.cc
index 89ff683..ff29e16 100644
--- a/ui/platform_window/win/win_window.cc
+++ b/ui/platform_window/win/win_window.cc
@@ -123,7 +123,7 @@ LRESULT WinWindow::OnCaptureChanged(UINT message,
LRESULT WinWindow::OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param) {
MSG msg = { hwnd(), message, w_param, l_param };
- KeyEvent event(msg, message == WM_CHAR);
+ KeyEvent event(msg);
delegate_->DispatchEvent(&event);
SetMsgHandled(event.handled());
return 0;