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

Side by Side Diff: ui/events/ozone/evdev/event_factory_evdev.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698