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

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: updates for events_unittests 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
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() {

Powered by Google App Engine
This is Rietveld 408576698