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

Unified Diff: media/audio/audio_manager_base.h

Issue 1806313003: Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from patch 48 Created 4 years, 8 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 | « media/audio/audio_manager.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.h
diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
index d8504478530f709dae5fc19552dc1fb1d0431328..61292c6712f9648d54cbc8deaf42e8f423f8d8c3 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -63,8 +63,6 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
~AudioManagerBase() override;
// AudioManager:
- scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override;
- scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() override;
base::string16 GetAudioInputDeviceModel() override;
void ShowAudioInputSettings() override;
void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
@@ -122,11 +120,14 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
int output_stream_count() const { return num_output_streams_; }
protected:
- AudioManagerBase(AudioLogFactory* audio_log_factory);
-
- // Shuts down the audio thread and releases all the audio output dispatchers
- // on the audio thread. All audio streams should be freed before Shutdown()
- // is called. This must be called in the destructor of every AudioManagerBase
+ AudioManagerBase(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
+ AudioLogFactory* audio_log_factory);
+
+ // Releases all the audio output dispatchers.
+ // All audio streams should be closed before Shutdown() is called.
+ // This must be called in the destructor of every AudioManagerBase
// implementation.
void Shutdown();
@@ -162,9 +163,6 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
class CompareByParams;
- // Called by Shutdown().
- void ShutdownOnAudioThread();
-
// Max number of open output streams, modified by
// SetMaxOutputStreamsAllowed().
int max_num_output_streams_;
@@ -181,9 +179,6 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
// Track output state change listeners.
base::ObserverList<AudioDeviceListener> output_listeners_;
- // Thread used to interact with audio streams created by this audio manager.
- scoped_ptr<base::Thread> audio_thread_;
-
// Map of cached AudioOutputDispatcher instances. Must only be touched
// from the audio thread (no locking).
AudioOutputDispatchers output_dispatchers_;
« no previous file with comments | « media/audio/audio_manager.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698