tree: d0994b374936a1042bc37dac19f562512ea42a21 [path history] [tgz]
  1. BUILD.gn
  2. chromium_service.cc
  3. chromium_service.h
  4. crash_reporter_builtin.cc
  5. crash_reporter_client.h
  6. crash_reporter_system.cc
  7. DEPS
  8. external_connector.h
  9. external_connector_impl.cc
  10. external_connector_impl.h
  11. external_service.cc
  12. external_service.h
  13. fake_external_connector.cc
  14. fake_external_connector.h
  15. perfetto_tracing_client.cc
  16. perfetto_tracing_client.h
  17. process_setup.cc
  18. process_setup.h
  19. README.md
  20. reconnecting_remote.h
  21. service_process.h
  22. standalone_mojo_broker.cc
  23. standalone_service_main.cc
  24. tracing_client.h
  25. tracing_client_dummy.cc
  26. tracing_client_dummy.h
chromecast/external_mojo/external_service_support/README.md

External Mojo service support

This directory contains utilities to ease development of Mojo services that run in processes outside of Chromium/cast_shell. The simplest model is to create a subclass of ‘ServiceProcess’ (and implement ‘ServiceProcess::Create()’ that returns an instance of that subclass), and link with ‘standalone_service_main’ to create the executable. In your ‘ServiceProcess’ implementation, you can bind to Mojo interfaces using the provided ‘Connector’ pointer, and/or register your own Mojo services for use by other processes.

The ‘ChromiumServiceWrapper’ class is intended to allow Mojo services that were intended to be embedded into cast_shell (or other ServiceManager embedder) to be moved into a completely separate process. It forwards ‘BindInterface()’ calls to the ‘service_manager::Service’ API. You can use ‘CreateChromiumServiceReceiver()’ to create a ‘mojo::PendingReceiver<service_manager::Service>’ to emulate the normal service creation flow; the ‘service_manager::Service::OnStart()’ method will be called automatically.

The ‘standalone_mojo_broker’ is intended for use on platforms where there is no cast_shell running; this allows Mojo services outside of cast_shell to communicate with each other without any Chromium embedder on the system.