[service-manager] Introduce ServiceBinding
Adds a new ServiceBinding helper to the Service Manager's client library. This is intended as a replacement for ServiceContext, because ServiceContext is cumbersome in its insistence to own the corresponding Service object. ServiceBinding, like ServiceContext, deals with the IPC interface between a local Service instance and the Service Manager, exposing interesting events to the Service implementation while also providing it access to its Connector and assigned Identity. Some particularly gnarly tests have been updated to use ServiceBinding in lieu of ServiceContext. Furthermore, without ServiceContext and with a lot of its legacy motivations gone, ServiceRunner isn't terribly useful either. The tests have also been trivially updated to manage their own MessageLoop instead of using ServiceRunner. This is the first in a series of patches which aim to completely eliminate ServiceContext, ForwardingService (in service.h), and ServiceRunner, requiring Service implementations to write a little more boilerplate in exchange for flexibility with ownership semantics. Bug: 891780 Change-Id: Ib0c1d3263f34a5e33a167a8187edad1d52413f73 Reviewed-on: https://chromium-review.googlesource.com/c/1259485Reviewed-by:Reilly Grant <reillyg@chromium.org> Commit-Queue: Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#597324}
Showing
Please register or sign in to comment