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

Unified Diff: ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.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/tablet_event_converter_evdev_unittest.cc
diff --git a/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
index 5e04057b3fee8ad6954acdfb1fa67ee34b687221..34d459b7034d6ba1fc411c20003ce74d7e124c15 100644
--- a/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
@@ -41,12 +41,10 @@ namespace ui {
class MockTabletEventConverterEvdev : public TabletEventConverterEvdev {
public:
- MockTabletEventConverterEvdev(
- int fd,
- base::FilePath path,
- CursorDelegateEvdev* cursor,
- const MouseMoveEventDispatchCallback& mouse_move_callback,
- const MouseButtonEventDispatchCallback& mouse_button_callback);
+ MockTabletEventConverterEvdev(int fd,
+ base::FilePath path,
+ CursorDelegateEvdev* cursor,
+ DeviceEventDispatcherEvdev* dispatcher);
~MockTabletEventConverterEvdev() override {};
void ConfigureReadMock(struct input_event* queue,
@@ -96,16 +94,14 @@ MockTabletEventConverterEvdev::MockTabletEventConverterEvdev(
int fd,
base::FilePath path,
CursorDelegateEvdev* cursor,
- const MouseMoveEventDispatchCallback& mouse_move_callback,
- const MouseButtonEventDispatchCallback& mouse_button_callback)
+ DeviceEventDispatcherEvdev* dispatcher)
: TabletEventConverterEvdev(fd,
path,
1,
INPUT_DEVICE_UNKNOWN,
cursor,
EventDeviceInfo(),
- mouse_move_callback,
- mouse_button_callback) {
+ dispatcher) {
// Real values taken from Wacom Intuos 4
x_abs_min_ = 0;
x_abs_range_ = 65024;
@@ -189,10 +185,7 @@ class TabletEventConverterEvdevTest : public testing::Test {
base::Unretained(this))));
device_.reset(new ui::MockTabletEventConverterEvdev(
events_in_, base::FilePath(kTestDevicePath), cursor_.get(),
- base::Bind(&ui::EventFactoryEvdev::PostMouseMoveEvent,
- base::Unretained(event_factory_.get())),
- base::Bind(&ui::EventFactoryEvdev::PostMouseButtonEvent,
- base::Unretained(event_factory_.get()))));
+ event_factory_.get()));
}
void TearDown() override {
« no previous file with comments | « ui/events/ozone/evdev/tablet_event_converter_evdev.cc ('k') | ui/events/ozone/evdev/touch_event_converter_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698