Apparently I forgot the details that led me to this design a couple of months ago.
Getting the SurfaceCoordinator (SurfaceController) isn't so much the problem. The issue is to use SurfaceCoordinator we want a scene::Surface. And this being the frontend, we only have frontend::Surface. So to avoid a dynamic_cast, I chose to go through ApplicationSession which is the only class that knows how to cleanly map a SurfaceId (from client messages) to scene::Surface for the SurfaceController/SurfaceCoordinator.
Apparently I forgot the details that led me to this design a couple of months ago.
Getting the SurfaceCoordinator (SurfaceController) isn't so much the problem. The issue is to use SurfaceCoordinator we want a scene::Surface. And this being the frontend, we only have frontend::Surface. So to avoid a dynamic_cast, I chose to go through ApplicationSession which is the only class that knows how to cleanly map a SurfaceId (from client messages) to scene::Surface for the SurfaceControll er/SurfaceCoord inator.