| Index: media/audio/audio_output_ipc.h
|
| diff --git a/media/audio/audio_output_ipc.h b/media/audio/audio_output_ipc.h
|
| index d42997ee67b82c6b8dd1557674852a2f25d6423d..cb23b1c41fef083806310091ff56e418f23a9391 100644
|
| --- a/media/audio/audio_output_ipc.h
|
| +++ b/media/audio/audio_output_ipc.h
|
| @@ -9,13 +9,20 @@
|
|
|
| #include "base/memory/shared_memory.h"
|
| #include "base/sync_socket.h"
|
| +#include "content/common/media/audio_output.mojom.h"
|
| #include "media/audio/audio_parameters.h"
|
| #include "media/base/media_export.h"
|
| #include "media/base/output_device_info.h"
|
| #include "url/origin.h"
|
|
|
| +namespace mojom {
|
| +class AudioOutputStreamPtr;
|
| +}
|
| +
|
| namespace media {
|
|
|
| +class AudioOutputIPC;
|
| +
|
| // Current status of the audio output stream in the browser process. Browser
|
| // sends information about the current playback state and error to the
|
| // renderer process using this type.
|
| @@ -31,6 +38,8 @@ enum AudioOutputIPCDelegateState {
|
| // has been created. Implemented by AudioOutputDevice.
|
| class MEDIA_EXPORT AudioOutputIPCDelegate {
|
| public:
|
| + virtual AudioOutputIPC* getIPC() = 0;
|
| +
|
| // Called when state of an audio stream has changed.
|
| virtual void OnStateChanged(AudioOutputIPCDelegateState state) = 0;
|
|
|
| @@ -48,7 +57,8 @@ class MEDIA_EXPORT AudioOutputIPCDelegate {
|
| // audio data to be written into the shared memory. The AudioOutputIPCDelegate
|
| // must read from this socket and provide audio whenever data (search for
|
| // "pending_bytes") is received.
|
| - virtual void OnStreamCreated(base::SharedMemoryHandle handle,
|
| + virtual void OnStreamCreated(content::mojom::AudioOutputStreamPtr* stream,
|
| + base::SharedMemoryHandle handle,
|
| base::SyncSocket::Handle socket_handle,
|
| int length) = 0;
|
|
|
| @@ -70,6 +80,10 @@ class MEDIA_EXPORT AudioOutputIPC {
|
| public:
|
| virtual ~AudioOutputIPC();
|
|
|
| + content::mojom::AudioOutputStreamPtr* GetAudioOutputStream();
|
| +
|
| + void SetAudioOutputStream(content::mojom::AudioOutputStreamPtr* stream);
|
| +
|
| // Sends a request to authorize the use of a specific audio output device
|
| // in the peer process.
|
| // If |device_id| is nonempty, the browser selects the device
|
| @@ -112,6 +126,9 @@ class MEDIA_EXPORT AudioOutputIPC {
|
|
|
| // Sets the volume of the audio stream.
|
| virtual void SetVolume(double volume) = 0;
|
| +
|
| + private:
|
| + content::mojom::AudioOutputStreamPtr* stream_;
|
| };
|
|
|
| } // namespace media
|
|
|