Commit 3365971e authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Improve documentation of LacrosChromeServiceImpl.

Change-Id: Ia074f4cf4f04ee755e41b938b229d4afb32f81de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416400
Commit-Queue: Erik Chen <erikchen@chromium.org>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808129}
parent 5e17eba0
...@@ -66,6 +66,12 @@ class COMPONENT_EXPORT(CHROMEOS_LACROS) LacrosChromeServiceImpl { ...@@ -66,6 +66,12 @@ class COMPONENT_EXPORT(CHROMEOS_LACROS) LacrosChromeServiceImpl {
void BindReceiver( void BindReceiver(
mojo::PendingReceiver<crosapi::mojom::LacrosChromeService> receiver); mojo::PendingReceiver<crosapi::mojom::LacrosChromeService> receiver);
// --------------------------------------------------------------------------
// mojo::Remote is sequence affine. The following methods are convenient
// helpers that expose pre-established Remotes that can only be used from the
// affine sequence (main thread).
// --------------------------------------------------------------------------
// This must be called on the affine sequence. // This must be called on the affine sequence.
mojo::Remote<crosapi::mojom::MessageCenter>& message_center_remote() { mojo::Remote<crosapi::mojom::MessageCenter>& message_center_remote() {
DCHECK_CALLED_ON_VALID_SEQUENCE(affine_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(affine_sequence_checker_);
...@@ -93,6 +99,13 @@ class COMPONENT_EXPORT(CHROMEOS_LACROS) LacrosChromeServiceImpl { ...@@ -93,6 +99,13 @@ class COMPONENT_EXPORT(CHROMEOS_LACROS) LacrosChromeServiceImpl {
return hid_manager_remote_; return hid_manager_remote_;
} }
// --------------------------------------------------------------------------
// Some clients will want to use mojo::Remotes on arbitrary sequences (e.g.
// background threads). The following methods allow the client to construct a
// mojo::Remote bound to an arbitrary sequence, and pass the other endpoint of
// the Remote (mojo::PendingReceiver) to ash to set up the interface.
// --------------------------------------------------------------------------
// This may be called on any thread. // This may be called on any thread.
void BindScreenManagerReceiver( void BindScreenManagerReceiver(
mojo::PendingReceiver<crosapi::mojom::ScreenManager> pending_receiver); mojo::PendingReceiver<crosapi::mojom::ScreenManager> pending_receiver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment