1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 import "media/mojo/mojom/audio_parameters.mojom";
9 // This interface is implemented by the browser process to log state information
10 // about an active audio component.
12 // Called when an audio component is created. |params| are the parameters of
13 // the created stream. |device_id| is the id of the audio device opened by
14 // the created stream.
15 OnCreated(media.mojom.AudioParameters params,
18 // Called when an audio component is started, generally this is synonymous
22 // Called when an audio component is stopped, generally this is synonymous
26 // Called when an audio component is closed, generally this is synonymous
30 // Called when an audio component encounters an error.
33 // Called when an audio component changes volume. |volume| is the new volume.
34 OnSetVolume(double volume);
36 // Called with information about audio processing set-up for an audio
38 OnProcessingStateChanged(string message);
40 // Called when an audio component wants to forward a log message.
41 OnLogMessage(string message);
44 enum AudioLogComponent {
50 // This interface is implemented by the browser process to allow clients to
51 // create AudioLog instances for tracking the behavior of an audio component.
52 // The only client for this interface is the audio service.
53 interface AudioLogFactory {
54 // Creates an AudioLog object for tracking the behavior for one instance of
55 // the given |component|. Each instance of an "owning" class must create its
56 // own AudioLog. The created AudioLog object is bound to |audio_log_receiver|.
57 CreateAudioLog(AudioLogComponent component,
59 pending_receiver<AudioLog> audio_log_receiver);