OLD | NEW |
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 // 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 } | 351 } |
352 | 352 |
353 webkit_event.setKeyIdentifierFromWindowsKeyCode(); | 353 webkit_event.setKeyIdentifierFromWindowsKeyCode(); |
354 | 354 |
355 // TODO: IsAutoRepeat/IsKeyPad? | 355 // TODO: IsAutoRepeat/IsKeyPad? |
356 | 356 |
357 return webkit_event; | 357 return webkit_event; |
358 } | 358 } |
359 | 359 |
360 WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( | 360 WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( |
361 ui::GestureEventImpl* event) { | 361 ui::GestureEvent* event) { |
362 WebKit::WebGestureEvent gesture_event; | 362 WebKit::WebGestureEvent gesture_event; |
363 | 363 |
364 switch (event->type()) { | 364 switch (event->type()) { |
365 case ui::ET_GESTURE_TAP: | 365 case ui::ET_GESTURE_TAP: |
366 gesture_event.type = WebKit::WebInputEvent::GestureTap; | 366 gesture_event.type = WebKit::WebInputEvent::GestureTap; |
367 gesture_event.deltaX = event->details().tap_count(); | 367 gesture_event.deltaX = event->details().tap_count(); |
368 break; | 368 break; |
369 case ui::ET_GESTURE_TAP_DOWN: | 369 case ui::ET_GESTURE_TAP_DOWN: |
370 gesture_event.type = WebKit::WebInputEvent::GestureTapDown; | 370 gesture_event.type = WebKit::WebInputEvent::GestureTapDown; |
371 break; | 371 break; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 486 |
487 // Update the type of the touch event. | 487 // Update the type of the touch event. |
488 web_event->type = TouchEventTypeFromEvent(event); | 488 web_event->type = TouchEventTypeFromEvent(event); |
489 web_event->timeStampSeconds = event->time_stamp().InSecondsF(); | 489 web_event->timeStampSeconds = event->time_stamp().InSecondsF(); |
490 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags()); | 490 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags()); |
491 | 491 |
492 return point; | 492 return point; |
493 } | 493 } |
494 | 494 |
495 } // namespace content | 495 } // namespace content |
OLD | NEW |