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

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

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 5 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') | ui/views/window/dialog_delegate_unittest.cc » ('j') | 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 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 1484
1485 void HWNDMessageHandler::OnInputLangChange(DWORD character_set, 1485 void HWNDMessageHandler::OnInputLangChange(DWORD character_set,
1486 HKL input_language_id) { 1486 HKL input_language_id) {
1487 delegate_->HandleInputLanguageChange(character_set, input_language_id); 1487 delegate_->HandleInputLanguageChange(character_set, input_language_id);
1488 } 1488 }
1489 1489
1490 LRESULT HWNDMessageHandler::OnKeyEvent(UINT message, 1490 LRESULT HWNDMessageHandler::OnKeyEvent(UINT message,
1491 WPARAM w_param, 1491 WPARAM w_param,
1492 LPARAM l_param) { 1492 LPARAM l_param) {
1493 MSG msg = { hwnd(), message, w_param, l_param, GetMessageTime() }; 1493 MSG msg = { hwnd(), message, w_param, l_param, GetMessageTime() };
1494 ui::KeyEvent key(msg, message == WM_CHAR); 1494 ui::KeyEvent key(msg);
1495 if (!delegate_->HandleUntranslatedKeyEvent(key)) 1495 if (!delegate_->HandleUntranslatedKeyEvent(key))
1496 DispatchKeyEventPostIME(key); 1496 DispatchKeyEventPostIME(key);
1497 return 0; 1497 return 0;
1498 } 1498 }
1499 1499
1500 void HWNDMessageHandler::OnKillFocus(HWND focused_window) { 1500 void HWNDMessageHandler::OnKillFocus(HWND focused_window) {
1501 delegate_->HandleNativeBlur(focused_window); 1501 delegate_->HandleNativeBlur(focused_window);
1502 SetMsgHandled(FALSE); 1502 SetMsgHandled(FALSE);
1503 } 1503 }
1504 1504
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2437 POINT cursor_pos = {0}; 2437 POINT cursor_pos = {0};
2438 ::GetCursorPos(&cursor_pos); 2438 ::GetCursorPos(&cursor_pos);
2439 if (memcmp(&cursor_pos, &mouse_location, sizeof(POINT))) 2439 if (memcmp(&cursor_pos, &mouse_location, sizeof(POINT)))
2440 return false; 2440 return false;
2441 return true; 2441 return true;
2442 } 2442 }
2443 return false; 2443 return false;
2444 } 2444 }
2445 2445
2446 } // namespace views 2446 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget_unittest.cc ('k') | ui/views/window/dialog_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698