Windows: Fix execution of keyboard shortcuts (issue #1299).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1916@1729 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2014-06-09 20:14:09 +00:00
parent 18032f30ec
commit 331c6ed5a8

View File

@ -840,27 +840,10 @@ void CefBrowserHostImpl::PlatformHandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
// Any unhandled keyboard/character messages are sent to DefWindowProc so that
// shortcut keys work correctly.
HWND hwnd = PlatformGetWindowHandle();
if (!hwnd)
return;
UINT message = 0;
switch (event.type) {
case blink::WebInputEvent::RawKeyDown:
message = WM_KEYDOWN;
break;
case blink::WebInputEvent::KeyUp:
message = WM_KEYUP;
break;
case blink::WebInputEvent::Char:
message = WM_CHAR;
break;
default:
NOTREACHED();
return;
if (event.os_event) {
const MSG& msg = event.os_event->native_event();
DefWindowProc(msg.hwnd, msg.message, msg.wParam, msg.lParam);
}
DefWindowProc(hwnd, message, event.windowsKeyCode, event.nativeKeyCode);
}
void CefBrowserHostImpl::PlatformRunFileChooser(