1) Make in-process Audio service own non-embedder AudioManager instance.
Currently when Audio service runs in the browser process, BrowserMainLoop always creates and owns an AudioManager instance. This instance is externally available though BML::audio_manager() getter.
Instead, in case AudioManager is not provided by ContentBrowserClient::CreateAudioManager(), it should be created and owned by Audio service. For that BML should manage the thread to create and run Audio service on.
2) Remove public access to AudioManager instance provided by AudioManager::Get().
We should either get rid of it altogether and pass a pointer to AudioManager around (cleaner), or (quicker) move the getter into an internal namespace and announce that an access to it is limited to media/audio only (classes which should be eventually moved to audio:: namespace)
Comment 1 by olka@chromium.org
, Apr 19 2018