| Index: ui/events/ozone/evdev/key_event_converter_evdev.cc
|
| diff --git a/ui/events/ozone/evdev/key_event_converter_evdev.cc b/ui/events/ozone/evdev/key_event_converter_evdev.cc
|
| index caf3f199528bd7251d4c2dc38c7dd7e5c9f65893..3bcb5f2f251266727462cc4e056ad6db9107a61e 100644
|
| --- a/ui/events/ozone/evdev/key_event_converter_evdev.cc
|
| +++ b/ui/events/ozone/evdev/key_event_converter_evdev.cc
|
| @@ -194,9 +194,8 @@ KeyEventConverterEvdev::KeyEventConverterEvdev(
|
| base::FilePath path,
|
| EventModifiersEvdev* modifiers,
|
| const EventDispatchCallback& callback)
|
| - : EventConverterEvdev(callback),
|
| - fd_(fd),
|
| - path_(path),
|
| + : EventConverterEvdev(fd, path),
|
| + callback_(callback),
|
| modifiers_(modifiers) {
|
| // TODO(spang): Initialize modifiers using EVIOCGKEY.
|
| }
|
| @@ -206,15 +205,6 @@ KeyEventConverterEvdev::~KeyEventConverterEvdev() {
|
| close(fd_);
|
| }
|
|
|
| -void KeyEventConverterEvdev::Start() {
|
| - base::MessageLoopForUI::current()->WatchFileDescriptor(
|
| - fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this);
|
| -}
|
| -
|
| -void KeyEventConverterEvdev::Stop() {
|
| - controller_.StopWatchingFileDescriptor();
|
| -}
|
| -
|
| void KeyEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
|
| input_event inputs[4];
|
| ssize_t read_size = read(fd, inputs, sizeof(inputs));
|
| @@ -231,10 +221,6 @@ void KeyEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
|
| ProcessEvents(inputs, read_size / sizeof(*inputs));
|
| }
|
|
|
| -void KeyEventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) {
|
| - NOTREACHED();
|
| -}
|
| -
|
| void KeyEventConverterEvdev::ProcessEvents(const input_event* inputs,
|
| int count) {
|
| for (int i = 0; i < count; ++i) {
|
| @@ -270,7 +256,7 @@ void KeyEventConverterEvdev::ConvertKeyEvent(int key, int value) {
|
| code,
|
| KeycodeConverter::NativeKeycodeToCode(key + kXkbKeycodeOffset),
|
| flags);
|
| - DispatchEventToCallback(&key_event);
|
| + callback_.Run(&key_event);
|
| }
|
|
|
| } // namespace ui
|
|
|