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

Side by Side Diff: media/audio/audio_system_impl.h

Issue 2763383002: Switching AudioInputDeviceManager from using AudioManager interface to AudioSystem one. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_AUDIO_SYSTEM_IMPL_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_
6 #define MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_ 6 #define MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_
7 7
8 #include "media/audio/audio_system.h" 8 #include "media/audio/audio_system.h"
9 9
10 namespace base { 10 namespace base {
11 class SingleThreadTaskRunner; 11 class SingleThreadTaskRunner;
12 } 12 }
13 13
14 namespace media { 14 namespace media {
15 class AudioManager; 15 class AudioManager;
16 16
17 class MEDIA_EXPORT AudioSystemImpl : public AudioSystem { 17 class MEDIA_EXPORT AudioSystemImpl : public AudioSystem {
18 public: 18 public:
19 static std::unique_ptr<AudioSystem> Create(AudioManager* audio_manager); 19 static UniquePtr Create(AudioManager* audio_manager);
20
21 ~AudioSystemImpl() override;
22 20
23 // AudioSystem implementation. 21 // AudioSystem implementation.
24 void GetInputStreamParameters( 22 void GetInputStreamParameters(
25 const std::string& device_id, 23 const std::string& device_id,
26 OnAudioParamsCallback on_params_cb) const override; 24 OnAudioParamsCallback on_params_cb) const override;
27 25
28 void GetOutputStreamParameters( 26 void GetOutputStreamParameters(
29 const std::string& device_id, 27 const std::string& device_id,
30 OnAudioParamsCallback on_params_cb) const override; 28 OnAudioParamsCallback on_params_cb) const override;
31 29
32 void HasInputDevices(OnBoolCallback on_has_devices_cb) const override; 30 void HasInputDevices(OnBoolCallback on_has_devices_cb) const override;
33 31
34 void GetDeviceDescriptions(OnDeviceDescriptionsCallback on_descriptions_cp, 32 void GetDeviceDescriptions(OnDeviceDescriptionsCallback on_descriptions_cb,
35 bool for_input) override; 33 bool for_input) override;
36 34
35 void GetAssociatedOutputDeviceID(const std::string& input_device_id,
36 OnDeviceIdCallback on_device_id_cb) override;
37
38 base::WeakPtr<AudioSystem> GetWeakPtr() override;
39
37 base::SingleThreadTaskRunner* GetTaskRunner() const override; 40 base::SingleThreadTaskRunner* GetTaskRunner() const override;
38 41
39 AudioManager* GetAudioManager() const override; 42 AudioManager* GetAudioManager() const override;
40 43
41 protected: 44 protected:
42 AudioSystemImpl(AudioManager* audio_manager); 45 AudioSystemImpl(AudioManager* audio_manager);
46 ~AudioSystemImpl() override;
43 47
44 private: 48 private:
45 AudioManager* const audio_manager_; 49 AudioManager* const audio_manager_;
46 50
51 base::WeakPtrFactory<AudioSystemImpl> weak_factory_;
47 DISALLOW_COPY_AND_ASSIGN(AudioSystemImpl); 52 DISALLOW_COPY_AND_ASSIGN(AudioSystemImpl);
48 }; 53 };
49 54
50 } // namespace media 55 } // namespace media
51 56
52 #endif // MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_ 57 #endif // MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698