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

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

Issue 2006083002: Use fake Input Device Settings with chrome://device-emulator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DevicePageTestsFixes
Patch Set: make dependent on a11y fix Created 4 years, 5 months 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/fake_input_device_settings.h
diff --git a/chrome/browser/chromeos/system/fake_input_device_settings.h b/chrome/browser/chromeos/system/fake_input_device_settings.h
index 5138454e9c26fb1b2bb3bee1bd6ac0dad0670f27..3da56e80b4528d5f30f7ef137f2e90e3c3f4a8bb 100644
--- a/chrome/browser/chromeos/system/fake_input_device_settings.h
+++ b/chrome/browser/chromeos/system/fake_input_device_settings.h
@@ -13,7 +13,8 @@ namespace chromeos {
namespace system {
// This fake just memorizes current values of input devices settings.
-class FakeInputDeviceSettings : public InputDeviceSettings {
+class FakeInputDeviceSettings : public InputDeviceSettings,
+ public InputDeviceSettings::FakeInterface {
public:
FakeInputDeviceSettings();
~FakeInputDeviceSettings() override;
@@ -32,19 +33,21 @@ class FakeInputDeviceSettings : public InputDeviceSettings {
void SetNaturalScroll(bool enabled) override;
void ReapplyTouchpadSettings() override;
void ReapplyMouseSettings() override;
+ InputDeviceSettings::FakeInterface* GetFakeInterface() override;
- const TouchpadSettings& current_touchpad_settings() const {
- return current_touchpad_settings_;
- }
-
- const MouseSettings& current_mouse_settings() const {
- return current_mouse_settings_;
- }
+ // Overridden from InputDeviceSettings::FakeInterface.
+ void set_touchpad_exists(bool exists) override;
+ void set_mouse_exists(bool exists) override;
+ const TouchpadSettings& current_touchpad_settings() const override;
+ const MouseSettings& current_mouse_settings() const override;
private:
TouchpadSettings current_touchpad_settings_;
MouseSettings current_mouse_settings_;
+ bool touchpad_exists_ = true;
+ bool mouse_exists_ = true;
+
DISALLOW_COPY_AND_ASSIGN(FakeInputDeviceSettings);
};
« no previous file with comments | « chrome/browser/chromeos/preferences_unittest.cc ('k') | chrome/browser/chromeos/system/fake_input_device_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698