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

Unified Diff: content/renderer/media/local_media_stream_audio_source.h

Issue 2622073003: Fix getUserMedia so that failure is reported for invalid audio sources. (Closed)
Patch Set: Switch to std::vector and std::unique_ptr Created 3 years, 11 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 | « no previous file | content/renderer/media/local_media_stream_audio_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/local_media_stream_audio_source.h
diff --git a/content/renderer/media/local_media_stream_audio_source.h b/content/renderer/media/local_media_stream_audio_source.h
index 1d9d63a0e8d2043c38333e6e5d5a6a077f634cfe..0b92751403771203fb2b43d96a4523f44d5f485a 100644
--- a/content/renderer/media/local_media_stream_audio_source.h
+++ b/content/renderer/media/local_media_stream_audio_source.h
@@ -23,7 +23,8 @@ class CONTENT_EXPORT LocalMediaStreamAudioSource
// audio data. Audio parameters and (optionally) a pre-existing audio session
// ID are read from |device_info|.
LocalMediaStreamAudioSource(int consumer_render_frame_id,
- const StreamDeviceInfo& device_info);
+ const StreamDeviceInfo& device_info,
+ const ConstraintsCallback& started_callback);
~LocalMediaStreamAudioSource() final;
@@ -33,6 +34,7 @@ class CONTENT_EXPORT LocalMediaStreamAudioSource
void EnsureSourceIsStopped() final;
// media::AudioCapturerSource::CaptureCallback implementation.
+ void OnCaptureStarted() final;
void Capture(const media::AudioBus* audio_bus,
int audio_delay_milliseconds,
double volume,
@@ -46,6 +48,9 @@ class CONTENT_EXPORT LocalMediaStreamAudioSource
// The device created by the AudioDeviceFactory in EnsureSourceIsStarted().
scoped_refptr<media::AudioCapturerSource> source_;
+ // Callback that's called when the audio source has been initialized.
+ ConstraintsCallback started_callback_;
+
// In debug builds, check that all methods that could cause object graph
// or data flow changes are being called on the main thread.
base::ThreadChecker thread_checker_;
« no previous file with comments | « no previous file | content/renderer/media/local_media_stream_audio_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698