MacPWAs: Add factory for remote RenderWidgetHostView
Add a new interface, content::mojom::NSViewBridgeFactory. This may be
used to create a content::mojo::RenderWidgetHostNSViewBridge in
another process, and initialize its client to a specified
content::mojo::RenderWidgetHostNSViewClient.
* Note that the interface created by mojom::NSViewBridgeFactory is a
stub interface, mojom::StubInterface, which is cast to a
mojom::RenderWidgetHostNSViewBridge. This is because the latter
has content-internal dependencies, and so cannot be included in
any other module.
Add a content::NSViewBridgeFactoryHost class that will own such
a connection. There will exist one instance of this class for each
AppShimHost in the browser process.
* Included in this a "host id". This will be set at initialization to
match a views::BridgeFactoryHost.
* When embedding web contents into a views::View, the
views::BridgedNativeWidgetHostImpl will specify this id to the
content::RenderWidgetHostViewMac, to ensure that all NSViews be
created in the same process.
Add a content::NSViewBridgeFactoryImpl class that implements the
content::mojom::NSViewBridgeFactory interface. There will exist one
global instance of this class in each app shim process.
Add to content::RenderWidgetHostViewMac a MigrateNSViewBridge function,
which will move corresponding NSView to a different host.
Add to RenderWidgetHostNSViewBridgeLocal a constructor that takes
mojo interfaces. This constructor is called in the app shim process.
Clarify that the creator of the RenderWidgetHostNSViewBridgeLocal is
its owner, and is responsible for its destruction.
Note that all interfaces are associated. This is because call ordering
needs to be preserved amongst multiple NSViews (e.g, to add one as a
subview of another, but only once both have been put in an expected
state).
Bug: 859152
Change-Id: I69f64c57cf51189ca75e215346f3ef1cbab23094
Reviewed-on: https://chromium-review.googlesource.com/1239763Reviewed-by:
Robert Sesek <rsesek@chromium.org>
Reviewed-by:
Avi Drissman <avi@chromium.org>
Reviewed-by:
Ken Rockot <rockot@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594797}
Showing
Please register or sign in to comment