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

Unified Diff: media/audio/fake_audio_output_stream.h

Issue 2507643002: Removes tracking for fake audio streams. (Closed)
Patch Set: Created 4 years, 1 month 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 | « media/audio/fake_audio_manager.cc ('k') | media/audio/fake_audio_output_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/fake_audio_output_stream.h
diff --git a/media/audio/fake_audio_output_stream.h b/media/audio/fake_audio_output_stream.h
index d4a9adec9562c67c28f389b1de121a86b2212cdd..feaf5d14e934dec86c55ad611e13eecbdc6a7efc 100644
--- a/media/audio/fake_audio_output_stream.h
+++ b/media/audio/fake_audio_output_stream.h
@@ -14,15 +14,15 @@
namespace media {
-class AudioManagerBase;
-
// A fake implementation of AudioOutputStream. Used for testing and when a real
// audio output device is unavailable or refusing output (e.g. remote desktop).
// Callbacks are driven on the AudioManager's message loop.
class MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream {
public:
- static AudioOutputStream* MakeFakeStream(AudioManagerBase* manager,
- const AudioParameters& params);
+ static AudioOutputStream* MakeFakeStream(
+ const scoped_refptr<base::SingleThreadTaskRunner>& audio_task_runner,
+ const scoped_refptr<base::SingleThreadTaskRunner>& worker_task_runner,
+ const AudioParameters& params);
// AudioOutputStream implementation.
bool Open() override;
@@ -33,16 +33,19 @@ class MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream {
void Close() override;
private:
- FakeAudioOutputStream(AudioManagerBase* manager,
- const AudioParameters& params);
+ FakeAudioOutputStream(
+ const scoped_refptr<base::SingleThreadTaskRunner>& audio_task_runner,
+ const scoped_refptr<base::SingleThreadTaskRunner>& worker_task_runner,
+ const AudioParameters& params);
~FakeAudioOutputStream() override;
// Task that periodically calls OnMoreData() to consume audio data.
void CallOnMoreData();
- AudioManagerBase* audio_manager_;
AudioSourceCallback* callback_;
FakeAudioWorker fake_worker_;
+ const scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
+ const scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_;
std::unique_ptr<AudioBus> audio_bus_;
DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream);
« no previous file with comments | « media/audio/fake_audio_manager.cc ('k') | media/audio/fake_audio_output_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698