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

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

Issue 1171953002: Add IPC interface for switching the audio output device for a given audio stream in the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More style fixes Created 5 years, 6 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..14958bb7c5589338d877fc2a03d43223a1bc669e 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::SwitchOutputDeviceResult,
+ media::AudioOutputIPCDelegate::kSwitchOutputDeviceResultLast)
+
IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config)
IPC_STRUCT_MEMBER(media::AudioParameters, params)
IPC_STRUCT_MEMBER(bool, automatic_gain_control)
@@ -71,6 +78,14 @@ IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume,
int /* stream id */,
double /* volume */)
+// 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::SwitchOutputDeviceResult /* result */)
+
// Messages sent from the renderer to the browser.
// Request that is sent to the browser for creating an audio output stream.
@@ -121,3 +136,11 @@ 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 */,
+ int /* render_frame_id */,
+ std::string /* device_id */,
+ GURL /* security_origin */,
+ int /* request_id */)

Powered by Google App Engine
This is Rietveld 408576698