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

Side by Side Diff: ui/events/ozone/evdev/input_controller_evdev.cc

Issue 806693009: Port ScopedDisableInternalMouseAndKeyboardX11 to Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ui/events/ozone/evdev/input_controller_evdev.h ('k') | ui/events/ozone/evdev/keyboard_evdev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/input_controller_evdev.h ('k') | ui/events/ozone/evdev/keyboard_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698