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 #include "ui/events/event.h" | 5 #include "ui/events/event.h" |
6 | 6 |
7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #endif | 10 #endif |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 rotation_angle_(GetTouchAngle(native_event)), | 441 rotation_angle_(GetTouchAngle(native_event)), |
442 force_(GetTouchForce(native_event)) { | 442 force_(GetTouchForce(native_event)) { |
443 latency()->AddLatencyNumberWithTimestamp( | 443 latency()->AddLatencyNumberWithTimestamp( |
444 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, | 444 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, |
445 0, | 445 0, |
446 0, | 446 0, |
447 base::TimeTicks::FromInternalValue(time_stamp().ToInternalValue()), | 447 base::TimeTicks::FromInternalValue(time_stamp().ToInternalValue()), |
448 1); | 448 1); |
449 | 449 |
450 latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 450 latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
| 451 |
| 452 if (type() == ET_TOUCH_PRESSED) |
| 453 IncrementTouchIdRefCount(native_event); |
451 } | 454 } |
452 | 455 |
453 TouchEvent::TouchEvent(EventType type, | 456 TouchEvent::TouchEvent(EventType type, |
454 const gfx::PointF& location, | 457 const gfx::PointF& location, |
455 int touch_id, | 458 int touch_id, |
456 base::TimeDelta time_stamp) | 459 base::TimeDelta time_stamp) |
457 : LocatedEvent(type, location, location, time_stamp, 0), | 460 : LocatedEvent(type, location, location, time_stamp, 0), |
458 touch_id_(touch_id), | 461 touch_id_(touch_id), |
459 radius_x_(0.0f), | 462 radius_x_(0.0f), |
460 radius_y_(0.0f), | 463 radius_y_(0.0f), |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 gfx::PointF(x, y), | 752 gfx::PointF(x, y), |
750 time_stamp, | 753 time_stamp, |
751 flags | EF_FROM_TOUCH), | 754 flags | EF_FROM_TOUCH), |
752 details_(details) { | 755 details_(details) { |
753 } | 756 } |
754 | 757 |
755 GestureEvent::~GestureEvent() { | 758 GestureEvent::~GestureEvent() { |
756 } | 759 } |
757 | 760 |
758 } // namespace ui | 761 } // namespace ui |
OLD | NEW |