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 #include "ui/events/devices/input_device.h" | 10 #include "ui/events/devices/input_device.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 | 13 |
14 EventConverterEvdev::EventConverterEvdev(int fd, | 14 EventConverterEvdev::EventConverterEvdev(int fd, |
15 const base::FilePath& path, | 15 const base::FilePath& path, |
16 int id, | 16 int id, |
17 InputDeviceType type) | 17 InputDeviceType type) |
18 : fd_(fd), path_(path), id_(id), type_(type) { | 18 : fd_(fd), path_(path), id_(id), type_(type), ignore_events_(false) { |
19 } | 19 } |
20 | 20 |
21 EventConverterEvdev::~EventConverterEvdev() { | 21 EventConverterEvdev::~EventConverterEvdev() { |
22 Stop(); | 22 Stop(); |
23 } | 23 } |
24 | 24 |
25 void EventConverterEvdev::Start() { | 25 void EventConverterEvdev::Start() { |
26 base::MessageLoopForUI::current()->WatchFileDescriptor( | 26 base::MessageLoopForUI::current()->WatchFileDescriptor( |
27 fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this); | 27 fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this); |
28 } | 28 } |
29 | 29 |
30 void EventConverterEvdev::Stop() { | 30 void EventConverterEvdev::Stop() { |
31 controller_.StopWatchingFileDescriptor(); | 31 controller_.StopWatchingFileDescriptor(); |
32 } | 32 } |
33 | 33 |
34 void EventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) { | 34 void EventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) { |
35 NOTREACHED(); | 35 NOTREACHED(); |
36 } | 36 } |
37 | 37 |
38 bool EventConverterEvdev::HasKeyboard() const { | 38 bool EventConverterEvdev::HasKeyboard() const { |
39 return false; | 39 return false; |
40 } | 40 } |
41 | 41 |
| 42 bool EventConverterEvdev::HasTouchpad() const { |
| 43 return false; |
| 44 } |
| 45 |
42 bool EventConverterEvdev::HasTouchscreen() const { | 46 bool EventConverterEvdev::HasTouchscreen() const { |
43 return false; | 47 return false; |
44 } | 48 } |
45 | 49 |
46 gfx::Size EventConverterEvdev::GetTouchscreenSize() const { | 50 gfx::Size EventConverterEvdev::GetTouchscreenSize() const { |
47 NOTREACHED(); | 51 NOTREACHED(); |
48 return gfx::Size(); | 52 return gfx::Size(); |
49 } | 53 } |
50 | 54 |
| 55 void EventConverterEvdev::SetAllowedKeys( |
| 56 scoped_ptr<std::set<DomCode>> allowed_keys) { |
| 57 NOTREACHED(); |
| 58 } |
| 59 |
| 60 void EventConverterEvdev::AllowAllKeys() { |
| 61 NOTREACHED(); |
| 62 } |
| 63 |
51 } // namespace ui | 64 } // namespace ui |
OLD | NEW |