| 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 #include <X11/keysym.h> | 10 #include <X11/keysym.h> |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 1, | 224 1, |
| 225 1000000, | 225 1000000, |
| 226 100, | 226 100, |
| 227 base::HistogramBase::kUmaTargetedHistogramFlag); | 227 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 228 counter_for_type->Add(delta.InMicroseconds()); | 228 counter_for_type->Add(delta.InMicroseconds()); |
| 229 | 229 |
| 230 #if defined(USE_X11) | 230 #if defined(USE_X11) |
| 231 if (native_event->type == GenericEvent) { | 231 if (native_event->type == GenericEvent) { |
| 232 XIDeviceEvent* xiev = | 232 XIDeviceEvent* xiev = |
| 233 static_cast<XIDeviceEvent*>(native_event->xcookie.data); | 233 static_cast<XIDeviceEvent*>(native_event->xcookie.data); |
| 234 source_device_id_ = xiev->sourceid; | 234 source_device_id_ = xiev->deviceid; |
| 235 } | 235 } |
| 236 #endif | 236 #endif |
| 237 } | 237 } |
| 238 | 238 |
| 239 Event::Event(const Event& copy) | 239 Event::Event(const Event& copy) |
| 240 : type_(copy.type_), | 240 : type_(copy.type_), |
| 241 time_stamp_(copy.time_stamp_), | 241 time_stamp_(copy.time_stamp_), |
| 242 latency_(copy.latency_), | 242 latency_(copy.latency_), |
| 243 flags_(copy.flags_), | 243 flags_(copy.flags_), |
| 244 native_event_(CopyNativeEvent(copy.native_event_)), | 244 native_event_(CopyNativeEvent(copy.native_event_)), |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 gfx::PointF(x, y), | 961 gfx::PointF(x, y), |
| 962 time_stamp, | 962 time_stamp, |
| 963 flags | EF_FROM_TOUCH), | 963 flags | EF_FROM_TOUCH), |
| 964 details_(details) { | 964 details_(details) { |
| 965 } | 965 } |
| 966 | 966 |
| 967 GestureEvent::~GestureEvent() { | 967 GestureEvent::~GestureEvent() { |
| 968 } | 968 } |
| 969 | 969 |
| 970 } // namespace ui | 970 } // namespace ui |
| OLD | NEW |