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

Unified Diff: services/view_manager/view_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/view_manager/view_manager_app.h ('k') | services/view_manager/view_manager_service_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/view_manager/view_manager_app.cc
diff --git a/services/view_manager/view_manager_app.cc b/services/view_manager/view_manager_app.cc
index e107a32da4f8830a18ad78d6df75e50695da0886..42548a79f06d4df17acdfea9643f7a26931176cd 100644
--- a/services/view_manager/view_manager_app.cc
+++ b/services/view_manager/view_manager_app.cc
@@ -58,20 +58,18 @@ void ViewManagerApp::OnLostConnectionToWindowManager() {
ClientConnection* ViewManagerApp::CreateClientConnectionForEmbedAtView(
ConnectionManager* connection_manager,
+ mojo::InterfaceRequest<mojo::ViewManagerService> service_request,
mojo::ConnectionSpecificId creator_id,
const std::string& creator_url,
const std::string& url,
const ViewId& root_id) {
- mojo::MessagePipe pipe;
+ mojo::ViewManagerClientPtr client;
+ wm_app_connection_->ConnectToApplication(url)->ConnectToService(&client);
- mojo::ServiceProvider* view_manager_service_provider =
- wm_app_connection_->ConnectToApplication(url)->GetServiceProvider();
- view_manager_service_provider->ConnectToService(
- ViewManagerServiceImpl::Client::Name_, pipe.handle1.Pass());
scoped_ptr<ViewManagerServiceImpl> service(new ViewManagerServiceImpl(
connection_manager, creator_id, creator_url, url, root_id));
return new DefaultClientConnection(service.Pass(), connection_manager,
- pipe.handle0.Pass());
+ service_request.Pass(), client.Pass());
}
void ViewManagerApp::Create(ApplicationConnection* connection,
@@ -84,8 +82,11 @@ void ViewManagerApp::Create(ApplicationConnection* connection,
scoped_ptr<ViewManagerServiceImpl> service(new ViewManagerServiceImpl(
connection_manager_.get(), kInvalidConnectionId, std::string(),
std::string("mojo:window_manager"), RootViewId()));
- scoped_ptr<ClientConnection> client_connection(new DefaultClientConnection(
- service.Pass(), connection_manager_.get(), request.PassMessagePipe()));
+ mojo::ViewManagerClientPtr client;
+ wm_internal_client_request_ = GetProxy(&client);
+ scoped_ptr<ClientConnection> client_connection(
+ new DefaultClientConnection(service.Pass(), connection_manager_.get(),
+ request.Pass(), client.Pass()));
connection_manager_->SetWindowManagerClientConnection(
client_connection.Pass());
}
@@ -104,6 +105,8 @@ void ViewManagerApp::Create(
new mojo::Binding<WindowManagerInternalClient>(connection_manager_.get(),
request.Pass()));
wm_internal_client_binding_->set_error_handler(this);
+ wm_internal_->SetViewManagerClient(
+ wm_internal_client_request_.PassMessagePipe());
}
void ViewManagerApp::OnConnectionError() {
« no previous file with comments | « services/view_manager/view_manager_app.h ('k') | services/view_manager/view_manager_service_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698