Chromium Code Reviews| 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..4c4895c706cd13bf2c1839f4c91c052f693c7523 100644 |
| --- a/chrome/browser/chromeos/system/input_device_settings.h |
| +++ b/chrome/browser/chromeos/system/input_device_settings.h |
| @@ -14,6 +14,7 @@ class PrefRegistrySimple; |
| namespace chromeos { |
| namespace system { |
| +class FakeInputDeviceSettings; |
| class InputDeviceSettings; |
| namespace internal { |
| @@ -160,10 +161,13 @@ class CHROMEOS_EXPORT InputDeviceSettings { |
| // Returns current instance of InputDeviceSettings. |
| static InputDeviceSettings* Get(); |
| + // Returns test instance of InputDeviceSettings. |
| + static FakeInputDeviceSettings* GetForTesting(); |
|
stevenjb
2016/06/30 00:17:30
See my comment in the other CL, this should be mer
michaelpg
2016/07/01 22:01:48
I would have to git try that to make sure it doesn
stevenjb
2016/07/02 00:28:26
I agree we shouldn't create a new / additional Fak
michaelpg
2016/07/07 22:16:54
Done, created InputDeviceSettings::FakeInterface.
|
| + |
| // 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); |
| + static void SetSettingsForTesting(FakeInputDeviceSettings* test_settings); |
| // Returns true if UI should implement enhanced keyboard support for cases |
| // where other input devices like mouse are absent. |
| @@ -179,8 +183,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 +208,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 |