| Index: media/audio/audio_output_device.h
|
| diff --git a/media/audio/audio_output_device.h b/media/audio/audio_output_device.h
|
| index ca11b80d9900dfc0d52ac00d621522aa18abf9d0..4dcef0ce0dc954eecfc52ffef6162e383e7977c9 100644
|
| --- a/media/audio/audio_output_device.h
|
| +++ b/media/audio/audio_output_device.h
|
| @@ -58,6 +58,8 @@
|
| #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_
|
| #define MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_
|
|
|
| +#include <string>
|
| +
|
| #include "base/basictypes.h"
|
| #include "base/bind.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -95,6 +97,10 @@ class MEDIA_EXPORT AudioOutputDevice
|
| void Play() override;
|
| void Pause() override;
|
| bool SetVolume(double volume) override;
|
| + void SwitchOutputDevice(
|
| + const std::string& device_id,
|
| + const GURL& security_origin,
|
| + scoped_ptr<SwitchOutputDeviceCallbackRunner> callback_runner) override;
|
|
|
| // Methods called on IO thread ----------------------------------------------
|
| // AudioOutputIPCDelegate methods.
|
| @@ -102,6 +108,8 @@ class MEDIA_EXPORT AudioOutputDevice
|
| void OnStreamCreated(base::SharedMemoryHandle handle,
|
| base::SyncSocket::Handle socket_handle,
|
| int length) override;
|
| + void OnOutputDeviceSwitched(int request_id,
|
| + SwitchOutputDeviceResult result) override;
|
| void OnIPCClosed() override;
|
|
|
| protected:
|
| @@ -129,11 +137,18 @@ class MEDIA_EXPORT AudioOutputDevice
|
| void PauseOnIOThread();
|
| void ShutDownOnIOThread();
|
| void SetVolumeOnIOThread(double volume);
|
| + void SwitchOutputDeviceOnIOThread(
|
| + const std::string& device_id,
|
| + const GURL& security_origin,
|
| + scoped_ptr<SwitchOutputDeviceCallbackRunner> callback_runner);
|
|
|
| // base::MessageLoop::DestructionObserver implementation for the IO loop.
|
| // If the IO loop dies before we do, we shut down the audio thread from here.
|
| void WillDestroyCurrentMessageLoop() override;
|
|
|
| + void SetCurrentSwitchRequest(
|
| + scoped_ptr<SwitchOutputDeviceCallbackRunner> callback_runner);
|
| +
|
| AudioParameters audio_parameters_;
|
|
|
| RenderCallback* callback_;
|
| @@ -171,6 +186,9 @@ class MEDIA_EXPORT AudioOutputDevice
|
| // the callback via Start(). See http://crbug.com/151051 for details.
|
| bool stopping_hack_;
|
|
|
| + int current_switch_request_id_;
|
| + scoped_ptr<SwitchOutputDeviceCallbackRunner> current_switch_callback_runner_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice);
|
| };
|
|
|
|
|