| Index: ui/views/mus/window_manager_connection.cc
|
| diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
|
| index f17c0aa96379af0e4f4211482041711d4505c760..a01f373cc9f40db51ba4a1d16b8fa5be244ec961 100644
|
| --- a/ui/views/mus/window_manager_connection.cc
|
| +++ b/ui/views/mus/window_manager_connection.cc
|
| @@ -13,6 +13,7 @@
|
| #include "components/mus/public/cpp/window_property.h"
|
| #include "components/mus/public/cpp/window_tree_client.h"
|
| #include "components/mus/public/interfaces/event_matcher.mojom.h"
|
| +#include "components/mus/public/interfaces/input_devices/input_devices.mojom.h"
|
| #include "components/mus/public/interfaces/window_tree.mojom.h"
|
| #include "services/shell/public/cpp/connection.h"
|
| #include "services/shell/public/cpp/connector.h"
|
| @@ -114,13 +115,10 @@ WindowManagerConnection::WindowManagerConnection(
|
| screen_.reset(new ScreenMus(this));
|
| screen_->Init(connector);
|
|
|
| - if (!ui::DeviceDataManager::HasInstance()) {
|
| - // TODO(sad): We should have a DeviceDataManager implementation that talks
|
| - // to a mojo service to learn about the input-devices on the system.
|
| - // http://crbug.com/601981
|
| - ui::DeviceDataManager::CreateInstance();
|
| - created_device_data_manager_ = true;
|
| - }
|
| + // Receives updates about input-devices from other another process.
|
| + input_device::mojom::InputDeviceServerPtr service;
|
| + connector->ConnectToInterface("mojo:mus", &service);
|
| + input_device_client_.Connect(std::move(service));
|
|
|
| ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind(
|
| &WindowManagerConnection::CreateNativeWidgetMus,
|
| @@ -132,8 +130,6 @@ WindowManagerConnection::~WindowManagerConnection() {
|
| // ~WindowTreeClient calls back to us (we're its delegate), destroy it while
|
| // we are still valid.
|
| client_.reset();
|
| - if (created_device_data_manager_)
|
| - ui::DeviceDataManager::DeleteInstance();
|
|
|
| if (ViewsDelegate::GetInstance()) {
|
| ViewsDelegate::GetInstance()->set_native_widget_factory(
|
|
|