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

Unified Diff: ash/mus/window_manager_application.cc

Issue 2795883002: Eliminate OnConnect usage (Closed)
Patch Set: . Created 3 years, 8 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 | « ash/mus/window_manager_application.h ('k') | ash/touch_hud/mus/touch_hud_application.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager_application.cc
diff --git a/ash/mus/window_manager_application.cc b/ash/mus/window_manager_application.cc
index b90425a4882fa72c363c27c9d576695364c2b4ef..933af3542315399d19f400ce2b0b47d4fb5e7ec6 100644
--- a/ash/mus/window_manager_application.cc
+++ b/ash/mus/window_manager_application.cc
@@ -112,6 +112,9 @@ void WindowManagerApplication::ShutdownComponents() {
}
void WindowManagerApplication::OnStart() {
+ mojo_interface_factory::RegisterInterfaces(
+ &registry_, base::ThreadTaskRunnerHandle::Get());
+
aura_init_ = base::MakeUnique<views::AuraInit>(
context()->connector(), context()->identity(), "ash_mus_resources.pak",
"ash_mus_resources_200.pak", nullptr,
@@ -135,13 +138,12 @@ void WindowManagerApplication::OnStart() {
init_network_handler);
}
-bool WindowManagerApplication::OnConnect(
- const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- // Register services used in both classic ash and mash.
- mojo_interface_factory::RegisterInterfaces(
- registry, base::ThreadTaskRunnerHandle::Get());
- return true;
+void WindowManagerApplication::OnBindInterface(
+ const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
} // namespace mus
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/touch_hud/mus/touch_hud_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698