| 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/input_controller_evdev.h" | 5 #include "ui/events/ozone/evdev/input_controller_evdev.h" |
| 6 | 6 |
| 7 #include <linux/input.h> | 7 #include <linux/input.h> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ui/events/ozone/evdev/input_device_factory_evdev.h" | 10 #include "ui/events/ozone/evdev/input_device_factory_proxy_evdev.h" |
| 11 #include "ui/events/ozone/evdev/keyboard_evdev.h" | 11 #include "ui/events/ozone/evdev/keyboard_evdev.h" |
| 12 #include "ui/events/ozone/evdev/mouse_button_map_evdev.h" | 12 #include "ui/events/ozone/evdev/mouse_button_map_evdev.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 InputControllerEvdev::InputControllerEvdev(KeyboardEvdev* keyboard, | 16 InputControllerEvdev::InputControllerEvdev(KeyboardEvdev* keyboard, |
| 17 MouseButtonMapEvdev* button_map) | 17 MouseButtonMapEvdev* button_map) |
| 18 : input_device_factory_(nullptr), | 18 : input_device_factory_(nullptr), |
| 19 keyboard_(keyboard), | 19 keyboard_(keyboard), |
| 20 button_map_(button_map), | 20 button_map_(button_map), |
| 21 has_mouse_(false), | 21 has_mouse_(false), |
| 22 has_touchpad_(false) { | 22 has_touchpad_(false) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 InputControllerEvdev::~InputControllerEvdev() { | 25 InputControllerEvdev::~InputControllerEvdev() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 void InputControllerEvdev::SetInputDeviceFactory( | 28 void InputControllerEvdev::SetInputDeviceFactory( |
| 29 InputDeviceFactoryEvdev* input_device_factory) { | 29 InputDeviceFactoryProxyEvdev* input_device_factory) { |
| 30 input_device_factory_ = input_device_factory; | 30 input_device_factory_ = input_device_factory; |
| 31 } | 31 } |
| 32 | 32 |
| 33 void InputControllerEvdev::SetHasMouse(bool has_mouse) { | 33 void InputControllerEvdev::SetHasMouse(bool has_mouse) { |
| 34 has_mouse_ = has_mouse; | 34 has_mouse_ = has_mouse; |
| 35 } | 35 } |
| 36 | 36 |
| 37 void InputControllerEvdev::SetHasTouchpad(bool has_touchpad) { | 37 void InputControllerEvdev::SetHasTouchpad(bool has_touchpad) { |
| 38 has_touchpad_ = has_touchpad; | 38 has_touchpad_ = has_touchpad; |
| 39 } | 39 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 button_map_->UpdateButtonMap(BTN_LEFT, right ? BTN_RIGHT : BTN_LEFT); | 132 button_map_->UpdateButtonMap(BTN_LEFT, right ? BTN_RIGHT : BTN_LEFT); |
| 133 button_map_->UpdateButtonMap(BTN_RIGHT, right ? BTN_LEFT : BTN_RIGHT); | 133 button_map_->UpdateButtonMap(BTN_RIGHT, right ? BTN_LEFT : BTN_RIGHT); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void InputControllerEvdev::SetTapToClickPaused(bool state) { | 136 void InputControllerEvdev::SetTapToClickPaused(bool state) { |
| 137 if (input_device_factory_) | 137 if (input_device_factory_) |
| 138 input_device_factory_->SetTapToClickPaused(state); | 138 input_device_factory_->SetTapToClickPaused(state); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace ui | 141 } // namespace ui |
| OLD | NEW |