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

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: Fix style 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | media/audio/audio_logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1034199e1fa8962498fc533cbcf8c8ca0203ab93 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,9 @@ 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::SwitchOutputDeviceResult,
+ media::SWITCH_OUTPUT_DEVICE_RESULT_LAST)
+
IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config)
IPC_STRUCT_MEMBER(media::AudioParameters, params)
IPC_STRUCT_MEMBER(bool, automatic_gain_control)
@@ -71,6 +77,13 @@ 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::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 +134,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 */)
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | media/audio/audio_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698