Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/renderer_host/input/web_input_event_builders_win.h" | 5 #include "content/browser/renderer_host/input/web_input_event_builders_win.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/renderer_host/input/web_input_event_util.h" | 8 #include "content/browser/renderer_host/input/web_input_event_util.h" |
| 9 #include "ui/gfx/win/dpi.h" | 9 #include "ui/gfx/win/dpi.h" |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 break; | 62 break; |
| 63 default: | 63 default: |
| 64 NOTREACHED(); | 64 NOTREACHED(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 if (result.type == WebInputEvent::Char | 67 if (result.type == WebInputEvent::Char |
| 68 || result.type == WebInputEvent::RawKeyDown) { | 68 || result.type == WebInputEvent::RawKeyDown) { |
| 69 result.text[0] = result.windowsKeyCode; | 69 result.text[0] = result.windowsKeyCode; |
| 70 result.unmodifiedText[0] = result.windowsKeyCode; | 70 result.unmodifiedText[0] = result.windowsKeyCode; |
| 71 } | 71 } |
| 72 if (result.type != WebInputEvent::Char) { | 72 if (result.type != WebInputEvent::Char) |
| 73 UpdateWindowsKeyCodeAndKeyIdentifier( | 73 result.setKeyIdentifierFromWindowsKeyCode(); |
|
Wez
2015/09/03 06:05:47
Is this even used any more? I thought Windows used
dtapuska
2015/09/03 13:39:40
Windows is ifdef'd in the aura build to use a buil
Wez
2015/09/09 06:06:11
Acknowledged.
| |
| 74 &result, | |
| 75 static_cast<ui::KeyboardCode>(result.windowsKeyCode)); | |
| 76 } | |
| 77 | 74 |
| 78 if (::GetKeyState(VK_SHIFT) & 0x8000) | 75 if (::GetKeyState(VK_SHIFT) & 0x8000) |
| 79 result.modifiers |= WebInputEvent::ShiftKey; | 76 result.modifiers |= WebInputEvent::ShiftKey; |
| 80 if (::GetKeyState(VK_CONTROL) & 0x8000) | 77 if (::GetKeyState(VK_CONTROL) & 0x8000) |
| 81 result.modifiers |= WebInputEvent::ControlKey; | 78 result.modifiers |= WebInputEvent::ControlKey; |
| 82 if (::GetKeyState(VK_MENU) & 0x8000) | 79 if (::GetKeyState(VK_MENU) & 0x8000) |
| 83 result.modifiers |= WebInputEvent::AltKey; | 80 result.modifiers |= WebInputEvent::AltKey; |
| 84 // NOTE: There doesn't seem to be a way to query the mouse button state in | 81 // NOTE: There doesn't seem to be a way to query the mouse button state in |
| 85 // this case. | 82 // this case. |
| 86 | 83 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 381 result.wheelTicksX = wheel_delta; | 378 result.wheelTicksX = wheel_delta; |
| 382 } else { | 379 } else { |
| 383 result.deltaY = scroll_delta; | 380 result.deltaY = scroll_delta; |
| 384 result.wheelTicksY = wheel_delta; | 381 result.wheelTicksY = wheel_delta; |
| 385 } | 382 } |
| 386 | 383 |
| 387 return result; | 384 return result; |
| 388 } | 385 } |
| 389 | 386 |
| 390 } // namespace content | 387 } // namespace content |
| OLD | NEW |