| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 void EventFactoryEvdev::SetFileTaskRunner( | 240 void EventFactoryEvdev::SetFileTaskRunner( |
| 241 scoped_refptr<base::TaskRunner> task_runner) { | 241 scoped_refptr<base::TaskRunner> task_runner) { |
| 242 file_task_runner_ = task_runner; | 242 file_task_runner_ = task_runner; |
| 243 } | 243 } |
| 244 | 244 |
| 245 void EventFactoryEvdev::WarpCursorTo(gfx::AcceleratedWidget widget, | 245 void EventFactoryEvdev::WarpCursorTo(gfx::AcceleratedWidget widget, |
| 246 const gfx::PointF& location) { | 246 const gfx::PointF& location) { |
| 247 if (cursor_) { | 247 if (cursor_) { |
| 248 cursor_->MoveCursorTo(widget, location); | 248 cursor_->MoveCursorTo(widget, location); |
| 249 MouseEvent mouse_event(ET_MOUSE_MOVED, | 249 MouseEvent mouse_event(ET_MOUSE_MOVED, |
| 250 cursor_->location(), | 250 gfx::ToFlooredPoint(cursor_->location()), |
| 251 cursor_->location(), | 251 gfx::ToFlooredPoint(cursor_->location()), |
| 252 modifiers_.GetModifierFlags(), | 252 modifiers_.GetModifierFlags(), |
| 253 /* changed_button_flags */ 0); | 253 /* changed_button_flags */ 0); |
| 254 DispatchEvent(&mouse_event); | 254 DispatchEvent(&mouse_event); |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace ui | 258 } // namespace ui |
| OLD | NEW |