| Index: ui/events/ozone/evdev/input_device_factory_proxy_evdev.cc
|
| diff --git a/ui/events/ozone/evdev/input_device_factory_proxy_evdev.cc b/ui/events/ozone/evdev/input_device_factory_proxy_evdev.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..928e49f4c11f566cf56f6313316fe886317686ff
|
| --- /dev/null
|
| +++ b/ui/events/ozone/evdev/input_device_factory_proxy_evdev.cc
|
| @@ -0,0 +1,103 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/events/ozone/evdev/input_device_factory_proxy_evdev.h"
|
| +
|
| +#include "base/bind.h"
|
| +#include "ui/events/ozone/evdev/input_device_factory_evdev.h"
|
| +
|
| +namespace ui {
|
| +
|
| +InputDeviceFactoryProxyEvdev::InputDeviceFactoryProxyEvdev(
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| + base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory)
|
| + : task_runner_(task_runner), input_device_factory_(input_device_factory) {
|
| +}
|
| +
|
| +InputDeviceFactoryProxyEvdev::~InputDeviceFactoryProxyEvdev() {
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::AddInputDevice(int id,
|
| + const base::FilePath& path) {
|
| + task_runner_->PostTask(FROM_HERE,
|
| + base::Bind(&InputDeviceFactoryEvdev::AddInputDevice,
|
| + input_device_factory_, id, path));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::RemoveInputDevice(
|
| + const base::FilePath& path) {
|
| + task_runner_->PostTask(FROM_HERE,
|
| + base::Bind(&InputDeviceFactoryEvdev::RemoveInputDevice,
|
| + input_device_factory_, path));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::DisableInternalTouchpad() {
|
| + task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::DisableInternalTouchpad,
|
| + input_device_factory_));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::EnableInternalTouchpad() {
|
| + task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::EnableInternalTouchpad,
|
| + input_device_factory_));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::DisableInternalKeyboardExceptKeys(
|
| + scoped_ptr<std::set<DomCode>> excepted_keys) {
|
| + task_runner_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&InputDeviceFactoryEvdev::DisableInternalKeyboardExceptKeys,
|
| + input_device_factory_, base::Passed(&excepted_keys)));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::EnableInternalKeyboard() {
|
| + task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::EnableInternalKeyboard,
|
| + input_device_factory_));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::SetTouchpadSensitivity(int value) {
|
| + task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetTouchpadSensitivity,
|
| + input_device_factory_, value));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::SetTapToClick(bool enabled) {
|
| + task_runner_->PostTask(FROM_HERE,
|
| + base::Bind(&InputDeviceFactoryEvdev::SetTapToClick,
|
| + input_device_factory_, enabled));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::SetThreeFingerClick(bool enabled) {
|
| + task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetThreeFingerClick,
|
| + input_device_factory_, enabled));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::SetTapDragging(bool enabled) {
|
| + task_runner_->PostTask(FROM_HERE,
|
| + base::Bind(&InputDeviceFactoryEvdev::SetTapDragging,
|
| + input_device_factory_, enabled));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::SetNaturalScroll(bool enabled) {
|
| + task_runner_->PostTask(FROM_HERE,
|
| + base::Bind(&InputDeviceFactoryEvdev::SetNaturalScroll,
|
| + input_device_factory_, enabled));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::SetMouseSensitivity(int value) {
|
| + task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetMouseSensitivity,
|
| + input_device_factory_, value));
|
| +}
|
| +
|
| +void InputDeviceFactoryProxyEvdev::SetTapToClickPaused(bool state) {
|
| + task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetTapToClickPaused,
|
| + input_device_factory_, state));
|
| +}
|
| +
|
| +} // namespace ui
|
|
|