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

Unified Diff: components/mus/mus_app.cc

Issue 2058853002: Enable InputDeviceServer/InputDeviceClient in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_device
Patch Set: Check for DDM existence. Created 4 years, 6 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
« no previous file with comments | « components/mus/mus_app.h ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/mus_app.cc
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index 75f219276ece862d839c2dde826b59938e48b268..1a0cb9fee9247c0419e363ab3e2eb11173e4c7b7 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -180,6 +180,11 @@ void MusApp::Initialize(shell::Connector* connector,
event_source_ = ui::PlatformEventSource::CreateDefault();
#endif
+ // This needs to happen after DeviceDataManager has been constructed. That
+ // happens either during OzonePlatform or PlatformEventSource initialization,
+ // so keep this line below both of those.
+ input_device_server_.RegisterAsObserver();
+
if (use_chrome_gpu_command_buffer_) {
GpuServiceMus::GetInstance();
} else {
@@ -210,6 +215,11 @@ bool MusApp::AcceptConnection(Connection* connection) {
connection->AddInterface<Gpu>(this);
}
+ // On non-Linux platforms there will be no DeviceDataManager instance and no
+ // purpose in adding the Mojo interface to connect to.
+ if (input_device_server_.IsRegisteredAsObserver())
+ input_device_server_.AddInterface(connection);
+
return true;
}
« no previous file with comments | « components/mus/mus_app.h ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698