Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: chrome/browser/chromeos/system/input_device_settings.h

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: style of pref name for local Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/system/input_device_settings.h
diff --git a/chrome/browser/chromeos/system/input_device_settings.h b/chrome/browser/chromeos/system/input_device_settings.h
index 5cf208f29a27b384e3d53e4eaf9dad212c6a6cdf..491c8fce05fb4a42698a33a61167c2d7a9117977 100644
--- a/chrome/browser/chromeos/system/input_device_settings.h
+++ b/chrome/browser/chromeos/system/input_device_settings.h
@@ -174,16 +174,30 @@ class CHROMEOS_EXPORT InputDeviceSettings {
// where other input devices like mouse are absent.
static bool ForceKeyboardDrivenUINavigation();
- // Registers profile pref names for touchpad and touch screen statuses.
+ // Registers local state pref names for touchscreen status.
+ static void RegisterPrefs(PrefRegistrySimple* registry);
+
+ // Registers profile pref names for touchpad and touchscreen statuses.
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
- // Updates the on/off status of the touchscreen/touchpad from the active
- // user's preferences.
- void UpdateTouchDevicesStatusFromActiveProfilePrefs();
+ // Updates the enabled/disabled status of the touchscreen/touchpad from the
+ // preferences.
+ void UpdateTouchDevicesStatusFromPrefs();
+
+ // If |use_local_state| is true, returns the touchscreen status from local
+ // state, otherwise from user prefs.
+ bool IsTouchscreenEnabledInPrefs(bool use_local_state) const;
+
+ // Sets the status of touchscreen to |enabled| in prefs. If |use_local_state|,
+ // pref is set in local state, otherwise in user pref.
+ void SetTouchscreenEnabledInPrefs(bool enabled, bool use_local_state);
+
+ // Updates the enabled/disabled status of the touchscreen from prefs. Enabled
+ // if both local state and user prefs are enabled, otherwise disabled.
+ void UpdateTouchscreenStatusFromPrefs();
- // Toggles the status of Touchscreen/Touchpad on or off and updates the local
+ // Toggles the status of touchpad enabled or disabled and updates the user
Daniel Erat 2016/12/03 03:11:55 nit: "... between enabled and disabled"
// prefs.
- void ToggleTouchscreen();
void ToggleTouchpad();
// Calls |callback|, possibly asynchronously, after determining if a touchpad

Powered by Google App Engine
This is Rietveld 408576698