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

Unified Diff: services/window_manager/window_manager_app.cc

Issue 893183003: De-client the ViewManager interfaces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/window_manager/window_manager_app.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/window_manager/window_manager_app.cc
diff --git a/services/window_manager/window_manager_app.cc b/services/window_manager/window_manager_app.cc
index a9db0c051634be267f97403688cd598c5ae38dd1..be509598c3445f42961be622981f459db50b7406 100644
--- a/services/window_manager/window_manager_app.cc
+++ b/services/window_manager/window_manager_app.cc
@@ -323,20 +323,12 @@ void WindowManagerApp::LaunchViewManager(mojo::ApplicationImpl* app) {
view_manager_client_factory_.reset(
new mojo::ViewManagerClientFactory(shell_, this));
- mojo::MessagePipe pipe;
ApplicationConnection* view_manager_app =
app->ConnectToApplication("mojo:view_manager");
- ServiceProvider* view_manager_service_provider =
- view_manager_app->GetServiceProvider();
- view_manager_service_provider->ConnectToService(
- mojo::ViewManagerService::Name_, pipe.handle1.Pass());
- view_manager_client_ =
- mojo::ViewManagerClientFactory::WeakBindViewManagerToPipe(
- pipe.handle0.Pass(), shell_, this).Pass();
+ view_manager_app->ConnectToService(&view_manager_service_);
view_manager_app->AddService(&native_viewport_event_dispatcher_factory_);
- view_manager_app->AddService(
- static_cast<InterfaceFactory<WindowManagerInternal>*>(this));
+ view_manager_app->AddService<WindowManagerInternal>(this);
view_manager_app->ConnectToService(&window_manager_client_);
}
@@ -371,4 +363,13 @@ void WindowManagerApp::CreateWindowManagerForViewManagerClient(
// destructor.
}
+void WindowManagerApp::SetViewManagerClient(
+ mojo::ScopedMessagePipeHandle view_manager_client_request) {
+ view_manager_client_ =
+ mojo::ViewManagerClientFactory::WeakBindViewManagerToPipe(
+ mojo::MakeRequest<mojo::ViewManagerClient>(
+ view_manager_client_request.Pass()),
+ view_manager_service_.Pass(), shell_, this).Pass();
+}
+
} // namespace window_manager
« no previous file with comments | « services/window_manager/window_manager_app.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698