| Index: chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
|
| diff --git a/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc b/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
|
| index 79d108edefbcd64e0dcbec0d6f1ec99b596ed504..fa173be41c79c19fcafdfa485dc474667a900857 100644
|
| --- a/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
|
| +++ b/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
|
| @@ -22,6 +22,7 @@
|
| #include "base/sys_info.h"
|
| #include "base/task_runner.h"
|
| #include "base/threading/sequenced_worker_pool.h"
|
| +#include "chrome/browser/chromeos/system/fake_input_device_settings.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "ui/events/base_event_utils.h"
|
| #include "ui/events/devices/x11/device_data_manager_x11.h"
|
| @@ -35,7 +36,7 @@ namespace system {
|
| namespace {
|
|
|
| InputDeviceSettings* g_instance = nullptr;
|
| -InputDeviceSettings* g_test_instance = nullptr;
|
| +FakeInputDeviceSettings* g_test_instance = nullptr;
|
|
|
| const char kDeviceTypeTouchpad[] = "touchpad";
|
| const char kDeviceTypeMouse[] = "mouse";
|
| @@ -350,8 +351,15 @@ InputDeviceSettings* InputDeviceSettings::Get() {
|
| }
|
|
|
| // static
|
| +FakeInputDeviceSettings* InputDeviceSettings::GetForTesting() {
|
| + if (!g_test_instance)
|
| + g_test_instance = new FakeInputDeviceSettings();
|
| + return g_test_instance;
|
| +}
|
| +
|
| +// static
|
| void InputDeviceSettings::SetSettingsForTesting(
|
| - InputDeviceSettings* test_settings) {
|
| + FakeInputDeviceSettings* test_settings) {
|
| if (g_test_instance == test_settings)
|
| return;
|
| delete g_test_instance;
|
|
|