Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / chromeos / system / fake_input_device_settings.cc
blobd673c19bf3c30fa345f636257227c005b800877b
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/system/fake_input_device_settings.h"
7 namespace chromeos {
8 namespace system {
10 FakeInputDeviceSettings::FakeInputDeviceSettings() {}
12 FakeInputDeviceSettings::~FakeInputDeviceSettings() {}
14 // Overriden from InputDeviceSettings.
15 void FakeInputDeviceSettings::TouchpadExists(
16 const DeviceExistsCallback& callback) {
17 callback.Run(true);
20 void FakeInputDeviceSettings::UpdateTouchpadSettings(
21 const TouchpadSettings& settings) {
22 current_touchpad_settings_.Update(settings);
25 void FakeInputDeviceSettings::SetTouchpadSensitivity(int value) {
26 TouchpadSettings settings;
27 settings.SetSensitivity(value);
28 UpdateTouchpadSettings(settings);
31 void FakeInputDeviceSettings::SetTapToClick(bool enabled) {
32 TouchpadSettings settings;
33 settings.SetTapToClick(enabled);
34 UpdateTouchpadSettings(settings);
37 void FakeInputDeviceSettings::SetThreeFingerClick(bool enabled) {
38 TouchpadSettings settings;
39 settings.SetThreeFingerClick(enabled);
40 UpdateTouchpadSettings(settings);
43 void FakeInputDeviceSettings::SetTapDragging(bool enabled) {
44 TouchpadSettings settings;
45 settings.SetTapDragging(enabled);
46 UpdateTouchpadSettings(settings);
49 void FakeInputDeviceSettings::SetNaturalScroll(bool enabled) {
50 TouchpadSettings settings;
51 settings.SetNaturalScroll(enabled);
52 UpdateTouchpadSettings(settings);
55 void FakeInputDeviceSettings::MouseExists(
56 const DeviceExistsCallback& callback) {
57 callback.Run(false);
60 void FakeInputDeviceSettings::UpdateMouseSettings(
61 const MouseSettings& settings) {
62 current_mouse_settings_.Update(settings);
65 void FakeInputDeviceSettings::SetMouseSensitivity(int value) {
66 MouseSettings settings;
67 settings.SetSensitivity(value);
68 UpdateMouseSettings(settings);
71 void FakeInputDeviceSettings::SetPrimaryButtonRight(bool right) {
72 MouseSettings settings;
73 settings.SetPrimaryButtonRight(right);
74 UpdateMouseSettings(settings);
77 void FakeInputDeviceSettings::ReapplyTouchpadSettings() {
80 void FakeInputDeviceSettings::ReapplyMouseSettings() {
83 } // namespace system
84 } // namespace chromeos