| 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 da1945861c68b801f8bc92fc0383d4326bbc4bd7..b02ebf556e0c854b3dbb2a5bc5fae16fe8abbb72 100644
|
| --- a/chrome/browser/chromeos/system/input_device_settings.h
|
| +++ b/chrome/browser/chromeos/system/input_device_settings.h
|
| @@ -155,16 +155,21 @@ class CHROMEOS_EXPORT InputDeviceSettings {
|
| public:
|
| typedef base::Callback<void(bool)> DeviceExistsCallback;
|
|
|
| + // Interface for faking touchpad and mouse. Accessed through
|
| + // GetFakeInterface(), implemented only in FakeInputDeviceSettings.
|
| + class FakeInterface {
|
| + public:
|
| + virtual void set_touchpad_exists(bool exists) = 0;
|
| + virtual void set_mouse_exists(bool exists) = 0;
|
| + virtual const TouchpadSettings& current_touchpad_settings() const = 0;
|
| + virtual const MouseSettings& current_mouse_settings() const = 0;
|
| + };
|
| +
|
| virtual ~InputDeviceSettings() {}
|
|
|
| // Returns current instance of InputDeviceSettings.
|
| static InputDeviceSettings* Get();
|
|
|
| - // Replaces current instance with |test_settings|. Takes ownership of
|
| - // |test_settings|. Default implementation could be returned back by passing
|
| - // NULL to this method.
|
| - static void SetSettingsForTesting(InputDeviceSettings* test_settings);
|
| -
|
| // Returns true if UI should implement enhanced keyboard support for cases
|
| // where other input devices like mouse are absent.
|
| static bool ForceKeyboardDrivenUINavigation();
|
| @@ -179,8 +184,8 @@ class CHROMEOS_EXPORT InputDeviceSettings {
|
| void ToggleTouchscreen();
|
| void ToggleTouchpad();
|
|
|
| - // Calls |callback| asynchronously after determining if a touchpad is
|
| - // connected.
|
| + // Calls |callback|, possibly asynchronously, after determining if a touchpad
|
| + // is connected.
|
| virtual void TouchpadExists(const DeviceExistsCallback& callback) = 0;
|
|
|
| // Updates several touchpad settings at a time. Updates only settings that
|
| @@ -204,7 +209,8 @@ class CHROMEOS_EXPORT InputDeviceSettings {
|
| // Turns natural scrolling on/off for all devices except wheel mice
|
| virtual void SetNaturalScroll(bool enabled) = 0;
|
|
|
| - // Calls |callback| asynchronously after determining if a mouse is connected.
|
| + // Calls |callback|, possibly asynchronously, after determining if a mouse is
|
| + // connected.
|
| virtual void MouseExists(const DeviceExistsCallback& callback) = 0;
|
|
|
| // Updates several mouse settings at a time. Updates only settings that
|
| @@ -225,6 +231,9 @@ class CHROMEOS_EXPORT InputDeviceSettings {
|
| // Reapplies previously set mouse settings.
|
| virtual void ReapplyMouseSettings() = 0;
|
|
|
| + // Returns an interface for faking settings, or nullptr.
|
| + virtual FakeInterface* GetFakeInterface() = 0;
|
| +
|
| private:
|
| virtual void SetInternalTouchpadEnabled(bool enabled) {}
|
| virtual void SetTouchscreensEnabled(bool enabled) {}
|
|
|