De-client the ViewManager interfaces
The ViewManager interface is composed of a ViewManagerService and
ViewManagerClient interface. The ViewManagerClient interface is
implemented by the view manager client library in
//mojo/public/view_manager/public/cpp/* for most use cases and the
ViewManagerService interface is implemented by
//services/view_manager/view_manager_service_impl. The normal startup
flow is that an application will ask the view manager service to embed
another application that includes the view manager client library. When
the embedded application starts up, it will register its ViewManagerClient
implementation on its ApplicationConnection. The view manager service
implementation will use this to establish a connection to the
ViewManagerClient interface implemented by the client lib. Then the
view manager service will pass a handle to itself via the
ViewManagerClient.OnEmbed() call.
The window manager startup sequence is a inverted from this flow. The
window manager implements the ViewManagerClient interface as well but
it initiates the connection to the view manager service. The view
manager service provides an implementation of the ViewManagerService
implementation when the window manager connects and connects back to
the window manager using the WindowManagerInternal interface. Then, the
view manager service allocates a message pipe and passes a
ViewManagerClient request along the WindowManagerInternal interface for
the window manager to bind to its implementation of ViewManagerClient.
The view manager apptests have both kinds of connections. The initial
view manager service connection goes through the window manager flow
and later connections go through the view manager client lib flow.
The handle types for window manager message pipes in the view manager
interfaces and vis versa are expressed in the mojom as
handle<message_pipe> instead of the typed values to avoid creating a
dependency between the interface definitions in the mojoms.
R=sky@chromium.org
BUG=451319
Review URL: https://codereview.chromium.org/893183003
diff --git a/services/view_manager/view_manager_service_impl.h b/services/view_manager/view_manager_service_impl.h
index b6ce0a2..2008d13 100644
--- a/services/view_manager/view_manager_service_impl.h
+++ b/services/view_manager/view_manager_service_impl.h
@@ -46,6 +46,7 @@
// |services| and |exposed_services| are the ServiceProviders to pass to the
// client via OnEmbed().
void Init(mojo::ViewManagerClient* client,
+ mojo::ViewManagerServicePtr service_ptr,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
mojo::ServiceProviderPtr exposed_services);