Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: ui/events/ozone/evdev/input_controller_evdev.cc

Issue 868043003: [PATCH 8/11] ozone: evdev: Plumb device changes to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/ozone/evdev/input_controller_evdev.h ('k') | ui/events/ozone/evdev/input_device_factory_evdev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/input_controller_evdev.cc
diff --git a/ui/events/ozone/evdev/input_controller_evdev.cc b/ui/events/ozone/evdev/input_controller_evdev.cc
index d169e7221100bfd1b2094a40351527774508b5c2..2fe0ef1081394618b3a546570e5f320f9edb9074 100644
--- a/ui/events/ozone/evdev/input_controller_evdev.cc
+++ b/ui/events/ozone/evdev/input_controller_evdev.cc
@@ -17,7 +17,9 @@ InputControllerEvdev::InputControllerEvdev(KeyboardEvdev* keyboard,
MouseButtonMapEvdev* button_map)
: input_device_factory_(nullptr),
keyboard_(keyboard),
- button_map_(button_map) {
+ button_map_(button_map),
+ has_mouse_(false),
+ has_touchpad_(false) {
}
InputControllerEvdev::~InputControllerEvdev() {
@@ -28,16 +30,20 @@ void InputControllerEvdev::SetInputDeviceFactory(
input_device_factory_ = input_device_factory;
}
+void InputControllerEvdev::set_has_mouse(bool has_mouse) {
+ has_mouse_ = has_mouse;
+}
+
+void InputControllerEvdev::set_has_touchpad(bool has_touchpad) {
+ has_touchpad_ = has_touchpad;
+}
+
bool InputControllerEvdev::HasMouse() {
- if (!input_device_factory_)
- return false;
- return input_device_factory_->HasMouse();
+ return has_mouse_;
}
bool InputControllerEvdev::HasTouchpad() {
- if (!input_device_factory_)
- return false;
- return input_device_factory_->HasTouchpad();
+ return has_touchpad_;
}
bool InputControllerEvdev::IsCapsLockEnabled() {
« no previous file with comments | « ui/events/ozone/evdev/input_controller_evdev.h ('k') | ui/events/ozone/evdev/input_device_factory_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698