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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.cc

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AudioManager injection into MediaStreamManager, consistent enum naming; per wjia@ comments. Also, … Created 8 years, 3 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/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 5c7380f1c157faf4f3c3e31d7dfd8c87c68a767b..e810dfcfbd224ad5684c53380403bdb3daf9645d 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -12,6 +12,7 @@
#include "content/browser/renderer_host/media/audio_input_sync_writer.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/common/media/audio_messages.h"
+#include "content/public/common/media_stream_request.h"
using content::BrowserMessageFilter;
using content::BrowserThread;
@@ -180,7 +181,12 @@ void AudioInputRendererHost::OnStartDevice(int stream_id, int session_id) {
// Start the device with the session_id. If the device is started
// successfully, OnDeviceStarted() callback will be triggered.
- media_stream_manager_->audio_input_device_manager()->Start(session_id, this);
+ media_stream_manager_->GetAudioInputDeviceManager(
+ content::MEDIA_DEVICE_AUDIO_CAPTURE)->Start(session_id, this);
+ // NOTE: Currently, use of AudioInputHostMsg_* only applies to the
+ // MEDIA_DEVICE_AUDIO_CAPTURE. The IPC interface could theoretically be
+ // extended to allow operation with the other video capture types (e.g., tab
+ // mirroring).
}
void AudioInputRendererHost::OnCreateStream(
@@ -337,7 +343,8 @@ void AudioInputRendererHost::OnDeviceStopped(int session_id) {
void AudioInputRendererHost::StopAndDeleteDevice(int session_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- media_stream_manager_->audio_input_device_manager()->Stop(session_id);
+ media_stream_manager_->GetAudioInputDeviceManager(
+ content::MEDIA_DEVICE_AUDIO_CAPTURE)->Stop(session_id);
// Delete the session entry.
session_entries_.erase(session_id);

Powered by Google App Engine
This is Rietveld 408576698