Landing Recent QUIC Changes.
[chromium-blink-merge.git] / ui / events / ozone / evdev / event_converter_evdev.cc
blobf6fe8fc0b366fc7a9c877723b83de4e6cb06dd76
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.
5 #include "ui/events/ozone/evdev/event_converter_evdev.h"
7 #include "base/files/file_path.h"
8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h"
10 #include "ui/events/devices/input_device.h"
12 namespace ui {
14 EventConverterEvdev::EventConverterEvdev(int fd,
15 const base::FilePath& path,
16 int id,
17 InputDeviceType type)
18 : fd_(fd), path_(path), id_(id), type_(type), ignore_events_(false) {
21 EventConverterEvdev::~EventConverterEvdev() {
22 Stop();
25 void EventConverterEvdev::Start() {
26 base::MessageLoopForUI::current()->WatchFileDescriptor(
27 fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this);
30 void EventConverterEvdev::Stop() {
31 controller_.StopWatchingFileDescriptor();
34 void EventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) {
35 NOTREACHED();
38 bool EventConverterEvdev::HasKeyboard() const {
39 return false;
42 bool EventConverterEvdev::HasMouse() const {
43 return false;
46 bool EventConverterEvdev::HasTouchpad() const {
47 return false;
50 bool EventConverterEvdev::HasTouchscreen() const {
51 return false;
54 gfx::Size EventConverterEvdev::GetTouchscreenSize() const {
55 NOTREACHED();
56 return gfx::Size();
59 void EventConverterEvdev::SetAllowedKeys(
60 scoped_ptr<std::set<DomCode>> allowed_keys) {
61 NOTREACHED();
64 void EventConverterEvdev::AllowAllKeys() {
65 NOTREACHED();
68 } // namespace ui