forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MBI]: Make AgentSchedulingGroup(Host) real RouteProviders & Associat…
…edInterfaceProviders This CL removes the content.mojom.RouteProvider and blink.mojom.AssociatedInterfaceProvider implementations from RenderThreadImpl and RenderProcessHostImpl. As a result, we make AgentSchedulingGroup and AgentSchedulingGroupHost fully-fledged RouteProviders and AssociatedInterfaceProviders. Consequently, we: (1) Remove the RenderThread public API addition done in crrev.com/c/2433793, since AgentSchedulingGroup is now wholly responsible for providing a remote mojom::RouteProvider*, and no longer delegates to RenderThreadImpl. (2) Introduce MockAgentSchedulingGroup alongside AgentSchedulingGroupHost to be used in unit tests. This provides a mock for GetRemoteRouteProvider() so we don't have to have a test-only path when RenderThreadImpl::current() == false alongside production code (3) Introduce temporary {RenderProcessHostImpl,ChildThreadimpl}::GetListener() methods for AgentSchedulingGroup and its host to use, to get IPC::Listeners from the routing ID map. This is important for the implementation of AssociatedInterfaceProvider, however it is temporary, and these methods will be removed when the legacy IPC functionality is fully transferred to ASG(H), and these objects have their own IPC::Listener* map. One subtle change that this CL makes is the way that the RouteProvider interface is bound between the RenderProcessHostImpl: Before this CL, the Renderer => Browser RouteProvider was bound lazily, whenever RenderThreadImpl::GetRemoteRouteProvider() was called for the first time. After this CL, the Renderer => Browser RouteProvider is bound at the exact same time as the Renderer => Browser interface. This is done in AgentSchedulingGroupHost::SetUpMojoIfNeeded(), where we call mojom::AgentSchedulingGroup::BindAssociatedRouteProvider(). We pass both a remote pointing to AgentSchedulingGroupHost, and a receiver that AgentSchedulingGroup will bind. Once bound, bi-directional communication is immediately available. One upside to this is that the bind lifetimes of the browser-side remote and receiver pair are 100% consistent. ---- This change is fully described in: https://docs.google.com/document/d/12jyv-8aBwMlSS_Y5roEl_ykZT0_eQszGiiNs7Hxktmk/edit#heading=h.3dn0j414iw3j R=haraken@chromium.org, kinuko@chromium.org, kouhei@chromium.org, talp@chromium.org Bug: 1132901 Change-Id: I819289c4d8d254229d5ad639ec8eb5fbe96d7381 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438232 Commit-Queue: Dominic Farolino <dom@chromium.org> Reviewed-by: Alexander Timin <altimin@chromium.org> Reviewed-by: Nasko Oskov <nasko@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Tal Pressman <talp@chromium.org> Cr-Commit-Position: refs/heads/master@{#819176}
- Loading branch information
1 parent
528cdb9
commit ba7fd52
Showing
18 changed files
with
210 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.