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 3 // found in the LICENSE file. 4 5 #include "ui/events/ozone/evdev/event_converter_evdev.h" 6 7 #include "base/files/file_path.h" 8 #include "base/logging.h" 9 #include "base/message_loop/message_loop.h" 10 11 namespace ui { 12 EventConverterEvdev(int fd,const base::FilePath & path)13EventConverterEvdev::EventConverterEvdev(int fd, const base::FilePath& path) 14 : fd_(fd), path_(path) { 15 } 16 ~EventConverterEvdev()17EventConverterEvdev::~EventConverterEvdev() { 18 Stop(); 19 } 20 Start()21void EventConverterEvdev::Start() { 22 base::MessageLoopForUI::current()->WatchFileDescriptor( 23 fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this); 24 } 25 Stop()26void EventConverterEvdev::Stop() { 27 controller_.StopWatchingFileDescriptor(); 28 } 29 OnFileCanWriteWithoutBlocking(int fd)30void EventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) { 31 NOTREACHED(); 32 } 33 34 } // namespace ui 35