Chromium Code Reviews| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 profile pref names for touchpad and touch screen statuses. | 177 // Registers profile pref names for touchpad and touch screen statuses. |
| 178 static void RegisterProfilePrefs(PrefRegistrySimple* registry); | 178 static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
| 179 | 179 |
| 180 // Updates the on/off status of the touchscreen/touchpad from the active | 180 // Updates the on/off status of the touchscreen/touchpad from the active |
| 181 // user's preferences. | 181 // user's preferences. |
| 182 void UpdateTouchDevicesStatusFromActiveProfilePrefs(); | 182 void UpdateTouchDevicesStatusFromActiveProfilePrefs(); |
| 183 | 183 |
| 184 // Toggles the status of Touchscreen/Touchpad on or off and updates the local | 184 // Returns true if touchscreen is on, otherwise false. |
| 185 // prefs. | 185 bool IsTouchscreenEnabled() const; |
| 186 void ToggleTouchscreen(); | 186 |
| 187 // Sets the status of touchscreen to |enabled| and updates the local prefs. | |
| 188 void SetTouchscreenEnabled(bool enabled); | |
| 189 | |
| 190 // Toggles the status of Touchpad on or off and updates the local prefs. | |
|
Daniel Erat
2016/11/30 22:58:07
nit: s/Touchpad/touchpad/
Qiang(Joe) Xu
2016/12/02 17:42:52
Done.
| |
| 187 void ToggleTouchpad(); | 191 void ToggleTouchpad(); |
| 188 | 192 |
| 189 // Calls |callback|, possibly asynchronously, after determining if a touchpad | 193 // Calls |callback|, possibly asynchronously, after determining if a touchpad |
| 190 // is connected. | 194 // is connected. |
| 191 virtual void TouchpadExists(const DeviceExistsCallback& callback) = 0; | 195 virtual void TouchpadExists(const DeviceExistsCallback& callback) = 0; |
| 192 | 196 |
| 193 // Updates several touchpad settings at a time. Updates only settings that | 197 // Updates several touchpad settings at a time. Updates only settings that |
| 194 // are set in |settings| object. It is more efficient to use this method to | 198 // are set in |settings| object. It is more efficient to use this method to |
| 195 // update several settings then calling Set* methods one by one. | 199 // update several settings then calling Set* methods one by one. |
| 196 virtual void UpdateTouchpadSettings(const TouchpadSettings& settings) = 0; | 200 virtual void UpdateTouchpadSettings(const TouchpadSettings& settings) = 0; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 238 | 242 |
| 239 private: | 243 private: |
| 240 virtual void SetInternalTouchpadEnabled(bool enabled) {} | 244 virtual void SetInternalTouchpadEnabled(bool enabled) {} |
| 241 virtual void SetTouchscreensEnabled(bool enabled) {} | 245 virtual void SetTouchscreensEnabled(bool enabled) {} |
| 242 }; | 246 }; |
| 243 | 247 |
| 244 } // namespace system | 248 } // namespace system |
| 245 } // namespace chromeos | 249 } // namespace chromeos |
| 246 | 250 |
| 247 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ | 251 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ |
| OLD | NEW |