Index: services/ui/service.cc |
diff --git a/services/ui/service.cc b/services/ui/service.cc |
index 34f4803d4984e997f8e53951e4f666b7319bb259..c9d15f26603642cd19d8fc9a8209ecf3ea3cb849 100644 |
--- a/services/ui/service.cc |
+++ b/services/ui/service.cc |
@@ -40,6 +40,7 @@ |
#include "services/ui/ws/window_tree_binding.h" |
#include "services/ui/ws/window_tree_factory.h" |
#include "services/ui/ws/window_tree_host_factory.h" |
+#include "services/ui/ws/window_tree_host_factory_registrar.h" |
#include "ui/base/platform_window_defaults.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/base/ui_base_paths.h" |
@@ -207,7 +208,8 @@ bool Service::OnConnect(const service_manager::ServiceInfo& remote_info, |
registry->AddInterface<mojom::IMEServer>(this); |
registry->AddInterface<mojom::UserAccessManager>(this); |
registry->AddInterface<mojom::UserActivityMonitor>(this); |
- registry->AddInterface<WindowTreeHostFactory>(this); |
+ registry->AddInterface<mojom::WindowTreeHostFactory>(this); |
+ registry->AddInterface<mojom::WindowTreeHostFactoryRegistrar>(this); |
registry->AddInterface<mojom::WindowManagerWindowTreeFactory>(this); |
registry->AddInterface<mojom::WindowTreeFactory>(this); |
registry |
@@ -355,6 +357,15 @@ void Service::Create(const service_manager::Identity& remote_identity, |
user_state->window_tree_host_factory->AddBinding(std::move(request)); |
} |
+void Service::Create(const service_manager::Identity& remote_identity, |
+ mojom::WindowTreeHostFactoryRegistrarRequest request) { |
+ AddUserIfNecessary(remote_identity); |
+ mojo::MakeStrongBinding(base::MakeUnique<ws::WindowTreeHostFactoryRegistrar>( |
+ window_server_.get(), remote_identity.user_id()), |
+ std::move(request)); |
+ window_server_->SetInExternalWindowMode(); |
+} |
+ |
void Service::Create( |
const service_manager::Identity& remote_identity, |
discardable_memory::mojom::DiscardableSharedMemoryManagerRequest request) { |