| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/system/input_device_settings.h" | 5 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/sys_info.h" | |
| 9 #include "chrome/browser/chromeos/system/fake_input_device_settings.h" | 8 #include "chrome/browser/chromeos/system/fake_input_device_settings.h" |
| 9 #include "chromeos/system/devicemode.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 #include "services/service_manager/runner/common/client_util.h" | 11 #include "services/service_manager/runner/common/client_util.h" |
| 12 #include "ui/ozone/public/input_controller.h" | 12 #include "ui/ozone/public/input_controller.h" |
| 13 #include "ui/ozone/public/ozone_platform.h" | 13 #include "ui/ozone/public/ozone_platform.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 namespace system { | 16 namespace system { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 void InputDeviceSettingsImplOzone::SetTouchscreensEnabled(bool enabled) { | 159 void InputDeviceSettingsImplOzone::SetTouchscreensEnabled(bool enabled) { |
| 160 input_controller_->SetTouchscreensEnabled(enabled); | 160 input_controller_->SetTouchscreensEnabled(enabled); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace | 163 } // namespace |
| 164 | 164 |
| 165 // static | 165 // static |
| 166 InputDeviceSettings* InputDeviceSettings::Get() { | 166 InputDeviceSettings* InputDeviceSettings::Get() { |
| 167 if (!g_instance) { | 167 if (!g_instance) { |
| 168 if (base::SysInfo::IsRunningOnChromeOS()) | 168 if (IsRunningAsSystemCompositor()) |
| 169 g_instance = new InputDeviceSettingsImplOzone; | 169 g_instance = new InputDeviceSettingsImplOzone; |
| 170 else | 170 else |
| 171 g_instance = new FakeInputDeviceSettings(); | 171 g_instance = new FakeInputDeviceSettings(); |
| 172 } | 172 } |
| 173 return g_instance; | 173 return g_instance; |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace system | 176 } // namespace system |
| 177 } // namespace chromeos | 177 } // namespace chromeos |
| OLD | NEW |