Add mojo based synchronous compositor for Android.
This change restructures some chrome IPC code into a subclasses. On the
renderer side the Chrome IPC is moved into the
SynchronousCompositorProxyChromeIPC subclass and the base class is
generalized to use callbacks that Mojo can use directly.
On the browser side an impl of the mojo SynchronousCompositor interface
is made to send Chrome IPC to the renderer.
There are two Hosts for the Synchronous Compositor. The control host
which is hosted by the SynchronousCompositorBrowserFilter on the IO thread
and the host which is hosted on the browser ui thread.
All mojo channels are associated channels with the widget_input_handler
so input is handled in order.
BUG=722928
Change-Id: I517ab8b391433fa6b5e4b4fe2f9440dcfed29c05
Reviewed-on: https://chromium-review.googlesource.com/830928
Commit-Queue: Dave Tapuska <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Reviewed-by: Ken Rockot <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Bo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#539051}
diff --git a/content/renderer/input/widget_input_handler_impl.cc b/content/renderer/input/widget_input_handler_impl.cc
index c06b9b0a..2d0b1d2 100644
--- a/content/renderer/input/widget_input_handler_impl.cc
+++ b/content/renderer/input/widget_input_handler_impl.cc
@@ -157,6 +157,14 @@
DispatchEvent(std::move(event), DispatchEventCallback());
}
+void WidgetInputHandlerImpl::AttachSynchronousCompositor(
+ mojom::SynchronousCompositorControlHostPtr control_host,
+ mojom::SynchronousCompositorHostAssociatedPtrInfo host,
+ mojom::SynchronousCompositorAssociatedRequest compositor_request) {
+ input_handler_manager_->AttachSynchronousCompositor(
+ std::move(control_host), std::move(host), std::move(compositor_request));
+}
+
void WidgetInputHandlerImpl::RunOnMainThread(base::OnceClosure closure) {
if (input_event_queue_) {
input_event_queue_->QueueClosure(base::BindOnce(