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

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

Issue 1412623006: Developer Feature: Add Debug Accelerators to Toggle Touchscreen/Touchpad On or Off (CrOS) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sadrul's comment Created 5 years, 1 month 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
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 <algorithm> 7 #include <algorithm>
8 #include <linux/input.h> 8 #include <linux/input.h>
9 9
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool InputControllerEvdev::SetCurrentLayoutByName( 85 bool InputControllerEvdev::SetCurrentLayoutByName(
86 const std::string& layout_name) { 86 const std::string& layout_name) {
87 return keyboard_->SetCurrentLayoutByName(layout_name); 87 return keyboard_->SetCurrentLayoutByName(layout_name);
88 } 88 }
89 89
90 void InputControllerEvdev::SetInternalTouchpadEnabled(bool enabled) { 90 void InputControllerEvdev::SetInternalTouchpadEnabled(bool enabled) {
91 input_device_settings_.enable_internal_touchpad = enabled; 91 input_device_settings_.enable_internal_touchpad = enabled;
92 ScheduleUpdateDeviceSettings(); 92 ScheduleUpdateDeviceSettings();
93 } 93 }
94 94
95 bool InputControllerEvdev::IsInternalTouchpadEnabled() const {
96 return input_device_settings_.enable_internal_touchpad;
97 }
98
99 void InputControllerEvdev::SetTouchscreensEnabled(bool enabled) {
100 input_device_settings_.enable_touch_screens = enabled;
101 ScheduleUpdateDeviceSettings();
102 }
103
95 void InputControllerEvdev::SetTouchEventLoggingEnabled(bool enabled) { 104 void InputControllerEvdev::SetTouchEventLoggingEnabled(bool enabled) {
96 input_device_settings_.touch_event_logging_enabled = enabled; 105 input_device_settings_.touch_event_logging_enabled = enabled;
97 ScheduleUpdateDeviceSettings(); 106 ScheduleUpdateDeviceSettings();
98 } 107 }
99 108
100 void InputControllerEvdev::SetInternalKeyboardFilter( 109 void InputControllerEvdev::SetInternalKeyboardFilter(
101 bool enable_filter, 110 bool enable_filter,
102 std::vector<DomCode> allowed_keys) { 111 std::vector<DomCode> allowed_keys) {
103 input_device_settings_.enable_internal_keyboard_filter = enable_filter; 112 input_device_settings_.enable_internal_keyboard_filter = enable_filter;
104 input_device_settings_.internal_keyboard_allowed_keys = allowed_keys; 113 input_device_settings_.internal_keyboard_allowed_keys = allowed_keys;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void InputControllerEvdev::UpdateCapsLockLed() { 188 void InputControllerEvdev::UpdateCapsLockLed() {
180 if (!input_device_factory_) 189 if (!input_device_factory_)
181 return; 190 return;
182 bool caps_lock_state = IsCapsLockEnabled(); 191 bool caps_lock_state = IsCapsLockEnabled();
183 if (caps_lock_state != caps_lock_led_state_) 192 if (caps_lock_state != caps_lock_led_state_)
184 input_device_factory_->SetCapsLockLed(caps_lock_state); 193 input_device_factory_->SetCapsLockLed(caps_lock_state);
185 caps_lock_led_state_ = caps_lock_state; 194 caps_lock_led_state_ = caps_lock_state;
186 } 195 }
187 196
188 } // namespace ui 197 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698