hal_adapter: refactor mojo binding and interface templates
Refactor MojoBindingDelegate and MojoInterfaceDelegate template
classes and their derived classes. Move the worker threads out of
the template classes and let the template classes take a task runner
in their constructors. This is preparation work for supporting multiple
mojo binding / inteface connections in one adapter.
BUG=b:36233258, b:32690003
TEST=Make sure USB camera preview works in Chrome and Android
Change-Id: I1d90b54b10322bc9130ddeabfa2846751888fe47
Reviewed-on: https://chromium-review.googlesource.com/487547
Commit-Ready: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Heng-ruey Hsu <henryhsu@google.com>
14 files changed