Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2288)

Unified Diff: content/common/media/audio_messages.h

Issue 1122393004: Add support for switching the audio output device for HTMLMediaElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to MediaPlayers so that they invoke callbacks in the correct threads. First complete implem… Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/media/audio_messages.h
diff --git a/content/common/media/audio_messages.h b/content/common/media/audio_messages.h
index 57dd4a66b67945af617f71968b2c925ca4f86b92..d3742207a83655e15ceb1968fc2201dcccb52bbd 100644
--- a/content/common/media/audio_messages.h
+++ b/content/common/media/audio_messages.h
@@ -5,6 +5,8 @@
// IPC messages for the audio.
// Multiply-included message file, hence no include guard.
+#include <string>
+
#include "base/basictypes.h"
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
@@ -14,6 +16,7 @@
#include "media/audio/audio_input_ipc.h"
#include "media/audio/audio_output_ipc.h"
#include "media/audio/audio_parameters.h"
+#include "url/gurl.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@@ -25,6 +28,10 @@ IPC_ENUM_TRAITS_MAX_VALUE(media::AudioInputIPCDelegate::State,
IPC_ENUM_TRAITS_MAX_VALUE(media::AudioOutputIPCDelegate::State,
media::AudioOutputIPCDelegate::kStateLast)
+IPC_ENUM_TRAITS_MAX_VALUE(
+ media::AudioOutputIPCDelegate::DeviceSwitchResult,
+ media::AudioOutputIPCDelegate::kDeviceSwitchResultLast)
+
IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config)
IPC_STRUCT_MEMBER(media::AudioParameters, params)
IPC_STRUCT_MEMBER(bool, automatic_gain_control)
@@ -121,3 +128,18 @@ IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume,
IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume,
int /* stream_id */,
double /* volume */)
+
+// Switch the output device of the stream specified by stream_id.
+IPC_MESSAGE_CONTROL5(AudioHostMsg_SwitchOutputDevice,
+ int /* stream_id */,
+ std::string /* device_id */,
+ GURL /* security_origin */,
+ int /* render_frame_id */,
+ int /* request_id */)
+
+// Notification message sent from AudioRendererHost to renderer for state
+// update after the renderer has requested a SwitchOutputDevice.
+IPC_MESSAGE_CONTROL3(AudioMsg_NotifyOutputDeviceSwitched,
+ int /* stream id */,
+ int /* request id */,
+ media::AudioOutputIPCDelegate::DeviceSwitchResult /* result */)

Powered by Google App Engine
This is Rietveld 408576698