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

Unified Diff: media/audio/pulse/audio_manager_pulse.h

Issue 2784433002: Ensures that audio tasks cannot run after AudioManager is deleted. (Closed)
Patch Set: rebase Created 3 years, 7 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/mock_audio_manager.cc ('k') | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/audio_manager_pulse.h
diff --git a/media/audio/pulse/audio_manager_pulse.h b/media/audio/pulse/audio_manager_pulse.h
index 662c4614a8ce97effbb19885ae7b82e8db50e2dc..bb1d1c08faef5834c12b403b3baafff19be4920b 100644
--- a/media/audio/pulse/audio_manager_pulse.h
+++ b/media/audio/pulse/audio_manager_pulse.h
@@ -17,12 +17,11 @@ namespace media {
class MEDIA_EXPORT AudioManagerPulse : public AudioManagerBase {
public:
- AudioManagerPulse(
- scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
- AudioLogFactory* audio_log_factory);
-
- bool Init();
+ AudioManagerPulse(std::unique_ptr<AudioThread> audio_thread,
+ AudioLogFactory* audio_log_factory,
+ pa_threaded_mainloop* pa_mainloop,
+ pa_context* pa_context);
+ ~AudioManagerPulse() override;
// Implementation of AudioManager.
bool HasAudioOutputDevices() override;
@@ -52,16 +51,12 @@ class MEDIA_EXPORT AudioManagerPulse : public AudioManagerBase {
const LogCallback& log_callback) override;
protected:
- ~AudioManagerPulse() override;
-
+ void ShutdownOnAudioThread() override;
AudioParameters GetPreferredOutputStreamParameters(
const std::string& output_device_id,
const AudioParameters& input_params) override;
private:
- bool InitPulse();
- void DestroyPulse();
-
void GetAudioDeviceNames(bool input, media::AudioDeviceNames* device_names);
// Callback to get the devices' info like names, used by GetInputDevices().
« no previous file with comments | « media/audio/mock_audio_manager.cc ('k') | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698