| Index: components/mus/input_devices/input_device_server.cc
|
| diff --git a/components/mus/input_devices/input_device_server.cc b/components/mus/input_devices/input_device_server.cc
|
| index df0fd6c123428df2dda0f3fca9170f34b25b056e..3514eb3566951bf5fad79cf94174182367528903 100644
|
| --- a/components/mus/input_devices/input_device_server.cc
|
| +++ b/components/mus/input_devices/input_device_server.cc
|
| @@ -23,13 +23,17 @@ InputDeviceServer::~InputDeviceServer() {
|
| }
|
|
|
| void InputDeviceServer::RegisterAsObserver() {
|
| - if (!manager_) {
|
| + if (!manager_ && ui::DeviceDataManager::HasInstance()) {
|
| manager_ = ui::DeviceDataManager::GetInstance();
|
| manager_->AddObserver(this);
|
| }
|
| }
|
|
|
| -void InputDeviceServer::RegisterInterface(shell::Connection* connection) {
|
| +bool InputDeviceServer::IsRegisteredAsObserver() const {
|
| + return manager_ != nullptr;
|
| +}
|
| +
|
| +void InputDeviceServer::AddInterface(shell::Connection* connection) {
|
| DCHECK(manager_);
|
| connection->AddInterface<mojom::InputDeviceServer>(this);
|
| }
|
|
|