0
Commit Graph

2 Commits

Author SHA1 Message Date
Ken Rockot
666c2b657a [content] Improve ServiceProcessHost API
This change covers a few useful improvements to ServiceProcessHost.

First, there are no longer actual ServiceProcessHost object
instances for users to retain.  Instead, service process lifetime
is tied strictly to the lifetime of the relevant service pipe.
Either the service or the browser side can hang up to elicit
service process teardown.

Second, API surface has been added to allow callers to enumerate
currently running service processes as well as observe service
process lifecycle events globally.

ServiceProcessHost tests are updated to cover the new usage, as
well as to demonstrate recommended usage in conjunction with new
Mojo Remote idle timeout behavior for managing service process
lifetime.

Finally, additional documentation and clarification has been added
to ServiceProcessHost's header.

This is part of the ongoing effort to simplify Chrome services:
https://docs.google.com/document/d/1M0-K0gi1xXO0f_-YKSH2LFVh4RJY-xe9T9VaGFOSXb0/edit

Bug: 977637
Change-Id: If789159df0fcebae5161323a2a323481005c9516
Tbr: dcheng@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1703095
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678705}
2019-07-18 16:13:25 +00:00
Ken Rockot
53077778e7 [content] Introduce ServiceProcessHost
ServiceProcessHost allows Content and its embedders to launch a new
service process for any given mojom service interface.

This CL wires up the support and converts a single test-only service
to use ServiceProcessHost instead of integrating with Service Manager.

Bug: 977637
Change-Id: I63e846bf816c51ba2c557bfdc8b41189a92d2890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1673922
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#672676}
2019-06-26 21:50:32 +00:00