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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 case ui::ET_GESTURE_BEGIN: | 410 case ui::ET_GESTURE_BEGIN: |
411 case ui::ET_GESTURE_END: | 411 case ui::ET_GESTURE_END: |
412 case ui::ET_GESTURE_MULTIFINGER_SWIPE: | 412 case ui::ET_GESTURE_MULTIFINGER_SWIPE: |
413 break; | 413 break; |
414 default: | 414 default: |
415 NOTREACHED() << "Unknown gesture type: " << event->type(); | 415 NOTREACHED() << "Unknown gesture type: " << event->type(); |
416 } | 416 } |
417 | 417 |
418 gesture_event.boundingBox = event->details().bounding_box(); | 418 gesture_event.boundingBox = event->details().bounding_box(); |
419 gesture_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); | 419 gesture_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); |
| 420 gesture_event.timeStampSeconds = event->time_stamp().InSecondsF(); |
420 | 421 |
421 return gesture_event; | 422 return gesture_event; |
422 } | 423 } |
423 | 424 |
424 WebKit::WebTouchPoint* UpdateWebTouchEventFromAuraEvent( | 425 WebKit::WebTouchPoint* UpdateWebTouchEventFromAuraEvent( |
425 ui::TouchEvent* event, WebKit::WebTouchEvent* web_event) { | 426 ui::TouchEvent* event, WebKit::WebTouchEvent* web_event) { |
426 WebKit::WebTouchPoint* point = NULL; | 427 WebKit::WebTouchPoint* point = NULL; |
427 switch (event->type()) { | 428 switch (event->type()) { |
428 case ui::ET_TOUCH_PRESSED: | 429 case ui::ET_TOUCH_PRESSED: |
429 // Add a new touch point. | 430 // Add a new touch point. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 487 |
487 // Update the type of the touch event. | 488 // Update the type of the touch event. |
488 web_event->type = TouchEventTypeFromEvent(event); | 489 web_event->type = TouchEventTypeFromEvent(event); |
489 web_event->timeStampSeconds = event->time_stamp().InSecondsF(); | 490 web_event->timeStampSeconds = event->time_stamp().InSecondsF(); |
490 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags()); | 491 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags()); |
491 | 492 |
492 return point; | 493 return point; |
493 } | 494 } |
494 | 495 |
495 } // namespace content | 496 } // namespace content |
OLD | NEW |