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

Unified Diff: media/audio/mac/audio_manager_mac.h

Issue 1780333007: AudioManagerBase: Create and run the audio thread lazily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 9 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: media/audio/mac/audio_manager_mac.h
diff --git a/media/audio/mac/audio_manager_mac.h b/media/audio/mac/audio_manager_mac.h
index 2112a88308151cae0e54e1590d8ced71c2a3899c..6a10e689fd172ffc1035198e5cd6389bc75025d6 100644
--- a/media/audio/mac/audio_manager_mac.h
+++ b/media/audio/mac/audio_manager_mac.h
@@ -29,6 +29,8 @@ class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase {
AudioManagerMac(AudioLogFactory* audio_log_factory);
// Implementation of AudioManager.
+ scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override;
+ scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() override;
bool HasAudioOutputDevices() override;
bool HasAudioInputDevices() override;
void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
@@ -122,6 +124,9 @@ class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase {
scoped_ptr<AudioDeviceListenerMac> output_device_listener_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ base::Thread worker_thread_;
+
// Track the output sample-rate and the default output device
// so we can intelligently handle device notifications only when necessary.
int current_sample_rate_;

Powered by Google App Engine
This is Rietveld 408576698