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

Unified Diff: ui/events/ozone/evdev/touch_event_converter_evdev.cc

Issue 869613003: [PATCH 5/11] ozone: evdev: Replace dispatch callbacks with an interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: namespace ui Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/touch_event_converter_evdev.cc
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
index 57f5ca85e122f2e1b2f9d062bba861dbadf16053..3cca7ac012a268c59fbb9c2e20ccdf2c056c8967 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
@@ -28,6 +28,7 @@
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/event_switches.h"
+#include "ui/events/ozone/evdev/device_event_dispatcher_evdev.h"
namespace {
@@ -74,9 +75,9 @@ TouchEventConverterEvdev::TouchEventConverterEvdev(
base::FilePath path,
int id,
InputDeviceType type,
- const TouchEventDispatchCallback& touch_callback)
+ DeviceEventDispatcherEvdev* dispatcher)
: EventConverterEvdev(fd, path, id, type),
- touch_callback_(touch_callback),
+ dispatcher_(dispatcher),
syn_dropped_(false),
is_type_a_(false),
current_slot_(0) {
@@ -272,7 +273,7 @@ void TouchEventConverterEvdev::ProcessSyn(const input_event& input) {
void TouchEventConverterEvdev::ReportEvent(int touch_id,
const InProgressEvents& event,
const base::TimeDelta& timestamp) {
- touch_callback_.Run(TouchEventParams(
+ dispatcher_->DispatchTouchEvent(TouchEventParams(
id_, touch_id, event.type_, gfx::PointF(event.x_, event.y_),
gfx::Vector2dF(event.radius_x_, event.radius_y_), event.pressure_,
timestamp));
« no previous file with comments | « ui/events/ozone/evdev/touch_event_converter_evdev.h ('k') | ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698