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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 1, | 223 1, |
224 1000000, | 224 1000000, |
225 100, | 225 100, |
226 base::HistogramBase::kUmaTargetedHistogramFlag); | 226 base::HistogramBase::kUmaTargetedHistogramFlag); |
227 counter_for_type->Add(delta.InMicroseconds()); | 227 counter_for_type->Add(delta.InMicroseconds()); |
228 | 228 |
229 #if defined(USE_X11) | 229 #if defined(USE_X11) |
230 if (native_event->type == GenericEvent) { | 230 if (native_event->type == GenericEvent) { |
231 XIDeviceEvent* xiev = | 231 XIDeviceEvent* xiev = |
232 static_cast<XIDeviceEvent*>(native_event->xcookie.data); | 232 static_cast<XIDeviceEvent*>(native_event->xcookie.data); |
233 source_device_id_ = xiev->deviceid; | 233 source_device_id_ = xiev->sourceid; |
234 } | 234 } |
235 #endif | 235 #endif |
236 } | 236 } |
237 | 237 |
238 Event::Event(const Event& copy) | 238 Event::Event(const Event& copy) |
239 : type_(copy.type_), | 239 : type_(copy.type_), |
240 time_stamp_(copy.time_stamp_), | 240 time_stamp_(copy.time_stamp_), |
241 latency_(copy.latency_), | 241 latency_(copy.latency_), |
242 flags_(copy.flags_), | 242 flags_(copy.flags_), |
243 native_event_(CopyNativeEvent(copy.native_event_)), | 243 native_event_(CopyNativeEvent(copy.native_event_)), |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 gfx::PointF(x, y), | 858 gfx::PointF(x, y), |
859 time_stamp, | 859 time_stamp, |
860 flags | EF_FROM_TOUCH), | 860 flags | EF_FROM_TOUCH), |
861 details_(details) { | 861 details_(details) { |
862 } | 862 } |
863 | 863 |
864 GestureEvent::~GestureEvent() { | 864 GestureEvent::~GestureEvent() { |
865 } | 865 } |
866 | 866 |
867 } // namespace ui | 867 } // namespace ui |
OLD | NEW |