| 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 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #if defined(USE_X11) | 9 #if defined(USE_X11) | 
| 10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> | 
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 517 //////////////////////////////////////////////////////////////////////////////// | 517 //////////////////////////////////////////////////////////////////////////////// | 
| 518 // TouchEvent | 518 // TouchEvent | 
| 519 | 519 | 
| 520 TouchEvent::TouchEvent(const base::NativeEvent& native_event) | 520 TouchEvent::TouchEvent(const base::NativeEvent& native_event) | 
| 521     : LocatedEvent(native_event), | 521     : LocatedEvent(native_event), | 
| 522       touch_id_(GetTouchId(native_event)), | 522       touch_id_(GetTouchId(native_event)), | 
| 523       unique_event_id_(ui::GetNextTouchEventId()), | 523       unique_event_id_(ui::GetNextTouchEventId()), | 
| 524       rotation_angle_(GetTouchAngle(native_event)), | 524       rotation_angle_(GetTouchAngle(native_event)), | 
| 525       may_cause_scrolling_(false), | 525       may_cause_scrolling_(false), | 
| 526       should_remove_native_touch_id_mapping_(false), | 526       should_remove_native_touch_id_mapping_(false), | 
| 527       pointer_details_(PointerDetails(EventPointerType::POINTER_TYPE_TOUCH, | 527       pointer_details_(GetTouchPointerDetailsFromNative(native_event)) { | 
| 528                                       GetTouchRadiusX(native_event), |  | 
| 529                                       GetTouchRadiusY(native_event), |  | 
| 530                                       GetTouchForce(native_event), |  | 
| 531                                       /* tilt_x */ 0.0f, |  | 
| 532                                       /* tilt_y */ 0.0f)) { |  | 
| 533   latency()->AddLatencyNumberWithTimestamp( | 528   latency()->AddLatencyNumberWithTimestamp( | 
| 534       INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0, | 529       INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0, | 
| 535       base::TimeTicks::FromInternalValue(time_stamp().ToInternalValue()), 1); | 530       base::TimeTicks::FromInternalValue(time_stamp().ToInternalValue()), 1); | 
| 536   latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 531   latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 
| 537 | 532 | 
| 538   FixRotationAngle(); | 533   FixRotationAngle(); | 
| 539   if (type() == ET_TOUCH_RELEASED || type() == ET_TOUCH_CANCELLED) | 534   if (type() == ET_TOUCH_RELEASED || type() == ET_TOUCH_CANCELLED) | 
| 540     should_remove_native_touch_id_mapping_ = true; | 535     should_remove_native_touch_id_mapping_ = true; | 
| 541 } | 536 } | 
| 542 | 537 | 
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 982                    gfx::PointF(x, y), | 977                    gfx::PointF(x, y), | 
| 983                    time_stamp, | 978                    time_stamp, | 
| 984                    flags | EF_FROM_TOUCH), | 979                    flags | EF_FROM_TOUCH), | 
| 985       details_(details) { | 980       details_(details) { | 
| 986 } | 981 } | 
| 987 | 982 | 
| 988 GestureEvent::~GestureEvent() { | 983 GestureEvent::~GestureEvent() { | 
| 989 } | 984 } | 
| 990 | 985 | 
| 991 }  // namespace ui | 986 }  // namespace ui | 
| OLD | NEW | 
|---|