content::ServiceRegistry dead, long live shell::Interface[Registry,Provider]

12 views
Skip to first unread message

Ben Goodger (Google)

unread,
Jun 29, 2016, 1:26:00 PM6/29/16
to Chromium-dev, chromium-mojo
With https://codereview.chromium.org/2105653002/ landed, content::ServiceRegistry is no more.

Replacing it are:

shell::InterfaceRegistry, an implementation of shell::mojom::InterfaceProvider which allows registration of factories to bind requests for interface implementations from remote code, and

shell::InterfaceProvider, which is a convenience wrapping a shell::mojom::InterfaceProviderPtr.

The places we had ServiceRegistries before we now have these types:

- browser <-> renderer
- per-frame
- per-worker thread
- browser <-> utility
- browser <-> gpu

Worry not, the API is very similar, and so most things you could do before with ServiceRegistry you can do with the new types.

My current objective is to make IPC initialization for child processes appear like a "canonical Mojo app", which is to say the primordial pipe is a request for a shell::ShellClient implementation, which the shell then uses to broker access to other interfaces, including ChannelMojo. The one change I plan to make in this area is to defer interface registration until the child receives AcceptConnection() on its ShellClient impl. This is important since it allows us to use Shell security policy to filter the interfaces that get exposed. This will happen over the next few weeks & if anything major changes I'll ping back here.

-Ben
Reply all
Reply to author
Forward
0 new messages