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/keysym.h> | 9 #include <X11/keysym.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 base::HistogramBase::kUmaTargetedHistogramFlag); | 239 base::HistogramBase::kUmaTargetedHistogramFlag); |
240 counter_for_type->Add(delta_sample); | 240 counter_for_type->Add(delta_sample); |
241 | 241 |
242 #if defined(USE_X11) | 242 #if defined(USE_X11) |
243 if (native_event->type == GenericEvent) { | 243 if (native_event->type == GenericEvent) { |
244 XIDeviceEvent* xiev = | 244 XIDeviceEvent* xiev = |
245 static_cast<XIDeviceEvent*>(native_event->xcookie.data); | 245 static_cast<XIDeviceEvent*>(native_event->xcookie.data); |
246 source_device_id_ = xiev->sourceid; | 246 source_device_id_ = xiev->sourceid; |
247 } | 247 } |
248 #endif | 248 #endif |
249 #if defined(USE_OZONE) | |
250 source_device_id_ = | |
251 static_cast<const Event*>(native_event)->source_device_id(); | |
252 #endif | |
253 } | 249 } |
254 | 250 |
255 Event::Event(const Event& copy) | 251 Event::Event(const Event& copy) |
256 : type_(copy.type_), | 252 : type_(copy.type_), |
257 time_stamp_(copy.time_stamp_), | 253 time_stamp_(copy.time_stamp_), |
258 latency_(copy.latency_), | 254 latency_(copy.latency_), |
259 flags_(copy.flags_), | 255 flags_(copy.flags_), |
260 native_event_(CopyNativeEvent(copy.native_event_)), | 256 native_event_(CopyNativeEvent(copy.native_event_)), |
261 delete_native_event_(true), | 257 delete_native_event_(true), |
262 cancelable_(true), | 258 cancelable_(true), |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 gfx::PointF(x, y), | 988 gfx::PointF(x, y), |
993 time_stamp, | 989 time_stamp, |
994 flags | EF_FROM_TOUCH), | 990 flags | EF_FROM_TOUCH), |
995 details_(details) { | 991 details_(details) { |
996 } | 992 } |
997 | 993 |
998 GestureEvent::~GestureEvent() { | 994 GestureEvent::~GestureEvent() { |
999 } | 995 } |
1000 | 996 |
1001 } // namespace ui | 997 } // namespace ui |
OLD | NEW |