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

Unified Diff: services/ui/service.cc

Issue 2712203002: c++ / mojo changes for 'external window mode'
Patch Set: rebased Created 3 years, 9 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 | « services/ui/service.h ('k') | services/ui/ws/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « services/ui/service.h ('k') | services/ui/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698