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