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

Unified Diff: chrome/browser/ui/views/chrome_browser_main_extra_parts_views.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 | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h ('k') | components/mus/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
index acf0d0687f4bb2c8557b5a0dd681bc76130e764a..cc5563ebec9c7c872dac04fb14d97d44a80fa3c7 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
@@ -15,7 +15,10 @@
#endif
#if defined(USE_AURA) && defined(MOJO_SHELL_CLIENT)
+#include "components/mus/public/cpp/input_devices/input_device_client.h"
+#include "components/mus/public/interfaces/input_devices/input_device_server.mojom.h"
#include "content/public/common/mojo_shell_connection.h"
+#include "services/shell/public/cpp/connector.h"
#include "services/shell/runner/common/client_util.h"
#include "ui/views/mus/window_manager_connection.h"
#endif
@@ -51,6 +54,12 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit() {
content::MojoShellConnection* mojo_shell_connection =
content::MojoShellConnection::GetForProcess();
if (mojo_shell_connection && shell::ShellIsRemote()) {
+ input_device_client_.reset(new mus::InputDeviceClient());
+ mus::mojom::InputDeviceServerPtr server;
+ mojo_shell_connection->GetConnector()->ConnectToInterface("mojo:mus",
+ &server);
+ input_device_client_->Connect(std::move(server));
+
window_manager_connection_ = views::WindowManagerConnection::Create(
mojo_shell_connection->GetConnector(),
mojo_shell_connection->GetIdentity());
« no previous file with comments | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h ('k') | components/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698