| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/system/input_device_settings.h" | 5 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 6 | 6 |
| 7 #include <stdarg.h> | 7 #include <stdarg.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Sets the touchpad sensitivity in the range [1, 5]. | 101 // Sets the touchpad sensitivity in the range [1, 5]. |
| 102 void SetSensitivity(int value) { | 102 void SetSensitivity(int value) { |
| 103 SetPointerSensitivity(kTpControl, value); | 103 SetPointerSensitivity(kTpControl, value); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void SetTapToClick(bool enabled) { | 106 void SetTapToClick(bool enabled) { |
| 107 ExecuteScript(3, kTpControl, "taptoclick", enabled ? "on" : "off"); | 107 ExecuteScript(3, kTpControl, "taptoclick", enabled ? "on" : "off"); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void SetThreeFingerClick(bool enabled) { |
| 111 ExecuteScript(3, kTpControl, "three_finger_click", enabled ? "on" : "off"); |
| 112 // For Alex/ZGB. |
| 113 ExecuteScript(3, kTpControl, "t5r2_three_finger_click", |
| 114 enabled ? "on" : "off"); |
| 115 } |
| 116 |
| 110 } // namespace touchpad_settings | 117 } // namespace touchpad_settings |
| 111 | 118 |
| 112 namespace mouse_settings { | 119 namespace mouse_settings { |
| 113 | 120 |
| 114 bool MouseExists() { | 121 bool MouseExists() { |
| 115 return DeviceExists(kMouseControl); | 122 return DeviceExists(kMouseControl); |
| 116 } | 123 } |
| 117 | 124 |
| 118 // Sets the touchpad sensitivity in the range [1, 5]. | 125 // Sets the touchpad sensitivity in the range [1, 5]. |
| 119 void SetSensitivity(int value) { | 126 void SetSensitivity(int value) { |
| 120 SetPointerSensitivity(kMouseControl, value); | 127 SetPointerSensitivity(kMouseControl, value); |
| 121 } | 128 } |
| 122 | 129 |
| 123 void SetPrimaryButtonRight(bool right) { | 130 void SetPrimaryButtonRight(bool right) { |
| 124 ExecuteScript(3, kMouseControl, "swap_left_right", right ? "1" : "0"); | 131 ExecuteScript(3, kMouseControl, "swap_left_right", right ? "1" : "0"); |
| 125 } | 132 } |
| 126 | 133 |
| 127 } // namespace mouse_settings | 134 } // namespace mouse_settings |
| 128 | 135 |
| 129 } // namespace system | 136 } // namespace system |
| 130 } // namespace chromeos | 137 } // namespace chromeos |
| OLD | NEW |