| 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 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 virtual ~InputDeviceSettings() {} | 168 virtual ~InputDeviceSettings() {} |
| 169 | 169 |
| 170 // Returns current instance of InputDeviceSettings. | 170 // Returns current instance of InputDeviceSettings. |
| 171 static InputDeviceSettings* Get(); | 171 static InputDeviceSettings* Get(); |
| 172 | 172 |
| 173 // Returns true if UI should implement enhanced keyboard support for cases | 173 // Returns true if UI should implement enhanced keyboard support for cases |
| 174 // where other input devices like mouse are absent. | 174 // where other input devices like mouse are absent. |
| 175 static bool ForceKeyboardDrivenUINavigation(); | 175 static bool ForceKeyboardDrivenUINavigation(); |
| 176 | 176 |
| 177 // Registers local pref names for touchpad and touch screen statuses. | 177 // Registers profile pref names for touchpad and touch screen statuses. |
| 178 static void RegisterPrefs(PrefRegistrySimple* registry); | 178 static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
| 179 | 179 |
| 180 void InitTouchDevicesStatusFromLocalPrefs(); | 180 // Updates the on/off status of the touchscreen/touchpad from the active |
| 181 // user's preferences. |
| 182 void UpdateTouchDevicesStatusFromActiveProfilePrefs(); |
| 181 | 183 |
| 182 // Toggles the status of Touchscreen/Touchpad on or off and updates the local | 184 // Toggles the status of Touchscreen/Touchpad on or off and updates the local |
| 183 // prefs. | 185 // prefs. |
| 184 void ToggleTouchscreen(); | 186 void ToggleTouchscreen(); |
| 185 void ToggleTouchpad(); | 187 void ToggleTouchpad(); |
| 186 | 188 |
| 187 // Calls |callback|, possibly asynchronously, after determining if a touchpad | 189 // Calls |callback|, possibly asynchronously, after determining if a touchpad |
| 188 // is connected. | 190 // is connected. |
| 189 virtual void TouchpadExists(const DeviceExistsCallback& callback) = 0; | 191 virtual void TouchpadExists(const DeviceExistsCallback& callback) = 0; |
| 190 | 192 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 238 |
| 237 private: | 239 private: |
| 238 virtual void SetInternalTouchpadEnabled(bool enabled) {} | 240 virtual void SetInternalTouchpadEnabled(bool enabled) {} |
| 239 virtual void SetTouchscreensEnabled(bool enabled) {} | 241 virtual void SetTouchscreensEnabled(bool enabled) {} |
| 240 }; | 242 }; |
| 241 | 243 |
| 242 } // namespace system | 244 } // namespace system |
| 243 } // namespace chromeos | 245 } // namespace chromeos |
| 244 | 246 |
| 245 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ | 247 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ |
| OLD | NEW |