| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ozone/evdev/event_factory_evdev.h" | 5 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <linux/input.h> | 8 #include <linux/input.h> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 cursor_->MoveCursorTo(widget, location); | 232 cursor_->MoveCursorTo(widget, location); |
| 233 MouseEvent mouse_event(ET_MOUSE_MOVED, | 233 MouseEvent mouse_event(ET_MOUSE_MOVED, |
| 234 cursor_->location(), | 234 cursor_->location(), |
| 235 cursor_->location(), | 235 cursor_->location(), |
| 236 modifiers_.GetModifierFlags(), | 236 modifiers_.GetModifierFlags(), |
| 237 /* changed_button_flags */ 0); | 237 /* changed_button_flags */ 0); |
| 238 DispatchEvent(&mouse_event); | 238 DispatchEvent(&mouse_event); |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 bool EventFactoryEvdev::HasIndirectTouch() { |
| 243 // search through the converters_ and say true / false if I have a thing
er |
| 244 // presumption: we don't have a huge number of devices |
| 245 for (std::map<base::FilePath, EventConverterEvdev*>::iterator it = converters_
.begin(); it!=converters_.end(); ++it) { |
| 246 if (it->second->HasIndirectTouch()) { |
| 247 return true; |
| 248 } |
| 249 } |
| 250 |
| 251 return false; |
| 252 } |
| 253 |
| 254 bool EventFactoryEvdev::HasRelXY() { |
| 255 // search through the converters_ and say true / false if I have a thing
er |
| 256 // presumption: we don't have a huge number of devices |
| 257 |
| 258 for (std::map<base::FilePath, EventConverterEvdev*>::iterator it = converters_
.begin(); it!=converters_.end(); ++it) { |
| 259 if (it->second->HasRelXY()) { |
| 260 return true; |
| 261 } |
| 262 } |
| 263 |
| 264 return false; |
| 265 } |
| 266 |
| 242 } // namespace ui | 267 } // namespace ui |
| OLD | NEW |