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

Side by Side Diff: media/audio/win/audio_manager_win.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
6 #define MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ 6 #define MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "media/audio/audio_manager_base.h" 11 #include "media/audio/audio_manager_base.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 class AudioDeviceListenerWin; 15 class AudioDeviceListenerWin;
16 16
17 // Windows implementation of the AudioManager singleton. This class is internal 17 // Windows implementation of the AudioManager singleton. This class is internal
18 // to the audio output and only internal users can call methods not exposed by 18 // to the audio output and only internal users can call methods not exposed by
19 // the AudioManager class. 19 // the AudioManager class.
20 class MEDIA_EXPORT AudioManagerWin : public AudioManagerBase { 20 class MEDIA_EXPORT AudioManagerWin : public AudioManagerBase {
21 public: 21 public:
22 AudioManagerWin(AudioLogFactory* audio_log_factory); 22 AudioManagerWin(
23 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
24 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
25 AudioLogFactory* audio_log_factory);
23 26
24 // Implementation of AudioManager. 27 // Implementation of AudioManager.
25 bool HasAudioOutputDevices() override; 28 bool HasAudioOutputDevices() override;
26 bool HasAudioInputDevices() override; 29 bool HasAudioInputDevices() override;
27 base::string16 GetAudioInputDeviceModel() override; 30 base::string16 GetAudioInputDeviceModel() override;
28 void ShowAudioInputSettings() override; 31 void ShowAudioInputSettings() override;
29 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override; 32 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
30 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override; 33 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
31 AudioParameters GetInputStreamParameters( 34 AudioParameters GetInputStreamParameters(
32 const std::string& device_id) override; 35 const std::string& device_id) override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // necessary. 81 // necessary.
79 // (Please see device_enumeration_win.h for more info about the two kinds of 82 // (Please see device_enumeration_win.h for more info about the two kinds of
80 // device IDs.) 83 // device IDs.)
81 AudioInputStream* CreatePCMWaveInAudioInputStream( 84 AudioInputStream* CreatePCMWaveInAudioInputStream(
82 const AudioParameters& params, 85 const AudioParameters& params,
83 const std::string& device_id); 86 const std::string& device_id);
84 87
85 // Helper methods for performing expensive initialization tasks on the audio 88 // Helper methods for performing expensive initialization tasks on the audio
86 // thread instead of on the UI thread which AudioManager is constructed on. 89 // thread instead of on the UI thread which AudioManager is constructed on.
87 void InitializeOnAudioThread(); 90 void InitializeOnAudioThread();
88 void ShutdownOnAudioThread();
89 91
90 void GetAudioDeviceNamesImpl(bool input, AudioDeviceNames* device_names); 92 void GetAudioDeviceNamesImpl(bool input, AudioDeviceNames* device_names);
91 93
92 // Listen for output device changes. 94 // Listen for output device changes.
93 scoped_ptr<AudioDeviceListenerWin> output_device_listener_; 95 scoped_ptr<AudioDeviceListenerWin> output_device_listener_;
94 96
95 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); 97 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin);
96 }; 98 };
97 99
98 } // namespace media 100 } // namespace media
99 101
100 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ 102 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_output_win_unittest.cc ('k') | media/audio/win/audio_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698