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

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

Issue 2006083002: Use fake Input Device Settings with chrome://device-emulator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DevicePageTestsFixes
Patch Set: Created 4 years, 7 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.cc
diff --git a/chrome/browser/chromeos/system/fake_input_device_settings.cc b/chrome/browser/chromeos/system/fake_input_device_settings.cc
index d673c19bf3c30fa345f636257227c005b800877b..8369f42e0ffbe19b17aeac627096c45dd52d8f7a 100644
--- a/chrome/browser/chromeos/system/fake_input_device_settings.cc
+++ b/chrome/browser/chromeos/system/fake_input_device_settings.cc
@@ -7,14 +7,15 @@
namespace chromeos {
namespace system {
-FakeInputDeviceSettings::FakeInputDeviceSettings() {}
+FakeInputDeviceSettings::FakeInputDeviceSettings()
+ : mouse_exists_(true), touchpad_exists_(true) {}
FakeInputDeviceSettings::~FakeInputDeviceSettings() {}
// Overriden from InputDeviceSettings.
void FakeInputDeviceSettings::TouchpadExists(
const DeviceExistsCallback& callback) {
- callback.Run(true);
+ callback.Run(touchpad_exists_);
}
void FakeInputDeviceSettings::UpdateTouchpadSettings(
@@ -54,7 +55,7 @@ void FakeInputDeviceSettings::SetNaturalScroll(bool enabled) {
void FakeInputDeviceSettings::MouseExists(
const DeviceExistsCallback& callback) {
- callback.Run(false);
+ callback.Run(mouse_exists_);
}
void FakeInputDeviceSettings::UpdateMouseSettings(
@@ -80,5 +81,13 @@ void FakeInputDeviceSettings::ReapplyTouchpadSettings() {
void FakeInputDeviceSettings::ReapplyMouseSettings() {
}
+void FakeInputDeviceSettings::SetMouseExists(bool exists) {
+ mouse_exists_ = exists;
+}
+
+void FakeInputDeviceSettings::SetTouchpadExists(bool exists) {
+ touchpad_exists_ = exists;
+}
+
} // namespace system
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698