blob: 8d987778860d2c31cabcd8f59c8758c9ccbfe1fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/events/ozone/evdev/event_converter_evdev.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "ui/events/devices/input_device.h"
namespace ui {
EventConverterEvdev::EventConverterEvdev(int fd,
const base::FilePath& path,
int id,
InputDeviceType type)
: fd_(fd), path_(path), id_(id), type_(type) {
}
EventConverterEvdev::~EventConverterEvdev() {
Stop();
}
void EventConverterEvdev::Start() {
base::MessageLoopForUI::current()->WatchFileDescriptor(
fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this);
}
void EventConverterEvdev::Stop() {
controller_.StopWatchingFileDescriptor();
}
void EventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) {
NOTREACHED();
}
bool EventConverterEvdev::HasKeyboard() const {
return false;
}
bool EventConverterEvdev::HasTouchscreen() const {
return false;
}
gfx::Size EventConverterEvdev::GetTouchscreenSize() const {
NOTREACHED();
return gfx::Size();
}
} // namespace ui
|