Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: ui/events/event.cc

Issue 1097393011: Revert of Ozone support for device special cases in keyboard event rewriting. (patchset #6 id:12000… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 gfx::PointF(x, y), 1005 gfx::PointF(x, y),
1010 time_stamp, 1006 time_stamp,
1011 flags | EF_FROM_TOUCH), 1007 flags | EF_FROM_TOUCH),
1012 details_(details) { 1008 details_(details) {
1013 } 1009 }
1014 1010
1015 GestureEvent::~GestureEvent() { 1011 GestureEvent::~GestureEvent() {
1016 } 1012 }
1017 1013
1018 } // namespace ui 1014 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/devices/x11/touch_factory_x11.cc ('k') | ui/events/ozone/evdev/event_converter_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698