OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Portions based heavily on: | 5 // Portions based heavily on: |
6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp | 6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp |
7 // | 7 // |
8 /* | 8 /* |
9 * Copyright (C) 2006-2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2006-2011 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 297 |
298 if (webkit_event.modifiers & WebKit::WebInputEvent::AltKey) | 298 if (webkit_event.modifiers & WebKit::WebInputEvent::AltKey) |
299 webkit_event.isSystemKey = true; | 299 webkit_event.isSystemKey = true; |
300 | 300 |
301 webkit_event.windowsKeyCode = XKeyEventToWindowsKeyCode(native_key_event); | 301 webkit_event.windowsKeyCode = XKeyEventToWindowsKeyCode(native_key_event); |
302 webkit_event.nativeKeyCode = native_key_event->keycode; | 302 webkit_event.nativeKeyCode = native_key_event->keycode; |
303 | 303 |
304 if (webkit_event.windowsKeyCode == ui::VKEY_RETURN) | 304 if (webkit_event.windowsKeyCode == ui::VKEY_RETURN) |
305 webkit_event.unmodifiedText[0] = '\r'; | 305 webkit_event.unmodifiedText[0] = '\r'; |
306 else | 306 else |
307 webkit_event.unmodifiedText[0] = ui::DefaultSymbolFromXEvent(native_event); | 307 webkit_event.unmodifiedText[0] = ui::GetCharacterFromXEvent(native_event); |
308 | 308 |
309 if (webkit_event.modifiers & WebKit::WebInputEvent::ControlKey) { | 309 if (webkit_event.modifiers & WebKit::WebInputEvent::ControlKey) { |
310 webkit_event.text[0] = | 310 webkit_event.text[0] = |
311 GetControlCharacter( | 311 GetControlCharacter( |
312 webkit_event.windowsKeyCode, | 312 webkit_event.windowsKeyCode, |
313 webkit_event.modifiers & WebKit::WebInputEvent::ShiftKey); | 313 webkit_event.modifiers & WebKit::WebInputEvent::ShiftKey); |
314 } else { | 314 } else { |
315 webkit_event.text[0] = webkit_event.unmodifiedText[0]; | 315 webkit_event.text[0] = webkit_event.unmodifiedText[0]; |
316 } | 316 } |
317 | 317 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 385 } |
386 | 386 |
387 // Update the type of the touch event. | 387 // Update the type of the touch event. |
388 web_event->type = TouchEventTypeFromEvent(event); | 388 web_event->type = TouchEventTypeFromEvent(event); |
389 web_event->timeStampSeconds = event->time_stamp().ToDoubleT(); | 389 web_event->timeStampSeconds = event->time_stamp().ToDoubleT(); |
390 | 390 |
391 return point; | 391 return point; |
392 } | 392 } |
393 | 393 |
394 } // namespace content | 394 } // namespace content |
OLD | NEW |