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/event_factory_evdev.h" | 10 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void InputControllerEvdev::SetAutoRepeatRate(const base::TimeDelta& delay, | 97 void InputControllerEvdev::SetAutoRepeatRate(const base::TimeDelta& delay, |
98 const base::TimeDelta& interval) { | 98 const base::TimeDelta& interval) { |
99 keyboard_->SetAutoRepeatRate(delay, interval); | 99 keyboard_->SetAutoRepeatRate(delay, interval); |
100 } | 100 } |
101 | 101 |
102 void InputControllerEvdev::GetAutoRepeatRate(base::TimeDelta* delay, | 102 void InputControllerEvdev::GetAutoRepeatRate(base::TimeDelta* delay, |
103 base::TimeDelta* interval) { | 103 base::TimeDelta* interval) { |
104 keyboard_->GetAutoRepeatRate(delay, interval); | 104 keyboard_->GetAutoRepeatRate(delay, interval); |
105 } | 105 } |
106 | 106 |
| 107 void InputControllerEvdev::DisableInternalTouchpad() { |
| 108 event_factory_->DisableInternalTouchpad(); |
| 109 } |
| 110 |
| 111 void InputControllerEvdev::EnableInternalTouchpad() { |
| 112 event_factory_->EnableInternalTouchpad(); |
| 113 } |
| 114 |
| 115 void InputControllerEvdev::DisableInternalKeyboardExceptKeys( |
| 116 scoped_ptr<std::set<DomCode>> excepted_keys) { |
| 117 event_factory_->DisableInternalKeyboardExceptKeys(excepted_keys.Pass()); |
| 118 } |
| 119 |
| 120 void InputControllerEvdev::EnableInternalKeyboard() { |
| 121 event_factory_->EnableInternalKeyboard(); |
| 122 } |
| 123 |
107 void InputControllerEvdev::SetIntPropertyForOneType(const EventDeviceType type, | 124 void InputControllerEvdev::SetIntPropertyForOneType(const EventDeviceType type, |
108 const std::string& name, | 125 const std::string& name, |
109 int value) { | 126 int value) { |
110 #if defined(USE_EVDEV_GESTURES) | 127 #if defined(USE_EVDEV_GESTURES) |
111 std::vector<int> ids; | 128 std::vector<int> ids; |
112 event_factory_->GetDeviceIdsByType(type, &ids); | 129 event_factory_->GetDeviceIdsByType(type, &ids); |
113 for (size_t i = 0; i < ids.size(); ++i) { | 130 for (size_t i = 0; i < ids.size(); ++i) { |
114 SetGestureIntProperty(gesture_property_provider_, ids[i], name, value); | 131 SetGestureIntProperty(gesture_property_provider_, ids[i], name, value); |
115 } | 132 } |
116 #endif | 133 #endif |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void InputControllerEvdev::SetPrimaryButtonRight(bool right) { | 178 void InputControllerEvdev::SetPrimaryButtonRight(bool right) { |
162 button_map_->UpdateButtonMap(BTN_LEFT, right ? BTN_RIGHT : BTN_LEFT); | 179 button_map_->UpdateButtonMap(BTN_LEFT, right ? BTN_RIGHT : BTN_LEFT); |
163 button_map_->UpdateButtonMap(BTN_RIGHT, right ? BTN_LEFT : BTN_RIGHT); | 180 button_map_->UpdateButtonMap(BTN_RIGHT, right ? BTN_LEFT : BTN_RIGHT); |
164 } | 181 } |
165 | 182 |
166 void InputControllerEvdev::SetTapToClickPaused(bool state) { | 183 void InputControllerEvdev::SetTapToClickPaused(bool state) { |
167 SetBoolPropertyForOneType(DT_TOUCHPAD, "Tap Paused", state); | 184 SetBoolPropertyForOneType(DT_TOUCHPAD, "Tap Paused", state); |
168 } | 185 } |
169 | 186 |
170 } // namespace ui | 187 } // namespace ui |
OLD | NEW |