Commit 22345af0 authored by Oksana Zhuravlova's avatar Oksana Zhuravlova Committed by Commit Bot

[mojo][doc] Add embedder info to the services page

This change adds information on how to register embedder-specific
interfaces with BrowserInterfaceBroker, as well as a note about renderer
kills when a binder for the requested interface is not found.

Change-Id: I53651b969454313617bd51abe949ae9e5a471b84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107740
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751427}
parent 1b10b88a
......@@ -454,7 +454,24 @@ void PopulateFrameBinders(RenderFrameHostImpl* host,
}
```
TODO: add information about workers and embedders.
For binding an embedder-specific document-scoped interface, override
[`ContentBrowserClient::RegisterBrowserInterfaceBindersForFrame()`](https://cs.chromium.org/chromium/src/content/public/browser/content_browser_client.h?rcl=3eb14ce219e383daa0cd8d743f475f9d9ce8c81a&l=999)
and add the binders to the provided map.
*** aside
NOTE: if BrowserInterfaceBroker cannot find a binder for the requested
interface, it will call `ReportNoBinderForInterface()` on the relevant
context host, which results in a `ReportBadMessage()` call on the host's
receiver (one of the consequences is a termination of the renderer). To
avoid this crash in tests (when content_shell doesn't bind some
Chrome-specific interfaces, but the renderer requests them anyway),
use the
[`EmptyBinderForFrame`](https://cs.chromium.org/chromium/src/content/browser/browser_interface_binders.cc?rcl=12e73e76a6898cb6df6a361a98320a8936f37949&l=407)
helper in `browser_interface_binders.cc`. However, it is recommended
to have the renderer and browser sides consistent if possible.
***
TODO: add information about workers.
## Additional Support
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment