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 35887421014e315deb7ea3b383c731e701c305a4..f46556111750382a9b17d3fbf3fcf420ae94728a 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::SetHasMouse(bool has_mouse) { |
alexst (slow to review)
2015/01/28 16:16:44
should_this_be_hacker_style()?
Here and for all t
spang
2015/01/28 19:04:54
Will change as a followup, don't want to add a lar
|
+ has_mouse_ = has_mouse; |
+} |
+ |
+void InputControllerEvdev::SetHasTouchpad(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() { |