OLD | NEW |
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_MOCK_AUDIO_MANAGER_H_ | 5 #ifndef MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ |
6 #define MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ | 6 #define MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/sequenced_task_runner_helpers.h" | 9 #include "base/sequenced_task_runner_helpers.h" |
10 #include "media/audio/audio_manager.h" | 10 #include "media/audio/audio_manager.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 const std::string& device_id) override; | 65 const std::string& device_id) override; |
66 std::string GetAssociatedOutputDeviceID( | 66 std::string GetAssociatedOutputDeviceID( |
67 const std::string& input_device_id) override; | 67 const std::string& input_device_id) override; |
68 | 68 |
69 std::unique_ptr<AudioLog> CreateAudioLog( | 69 std::unique_ptr<AudioLog> CreateAudioLog( |
70 AudioLogFactory::AudioComponent component) override; | 70 AudioLogFactory::AudioComponent component) override; |
71 | 71 |
72 const char* GetName() override; | 72 const char* GetName() override; |
73 | 73 |
74 // Setters to emulate desired in-test behavior. | 74 // Setters to emulate desired in-test behavior. |
75 void SetInputStreamParameters(const AudioParameters& params); | 75 void SetInputStreamParameters(const AudioParameters& input_params); |
76 void SetOutputStreamParameters(const AudioParameters& params); | |
77 void SetDefaultOutputStreamParameters(const AudioParameters& params); | |
78 void SetHasInputDevices(bool has_input_devices); | 76 void SetHasInputDevices(bool has_input_devices); |
79 void SetHasOutputDevices(bool has_output_devices); | |
80 | 77 |
81 protected: | 78 protected: |
82 ~MockAudioManager() override; | 79 ~MockAudioManager() override; |
83 | 80 |
84 private: | 81 private: |
85 friend class base::DeleteHelper<MockAudioManager>; | 82 friend class base::DeleteHelper<MockAudioManager>; |
86 | |
87 AudioParameters input_params_; | 83 AudioParameters input_params_; |
88 AudioParameters output_params_; | |
89 AudioParameters default_output_params_; | |
90 bool has_input_devices_ = true; | 84 bool has_input_devices_ = true; |
91 bool has_output_devices_ = true; | |
92 | 85 |
93 DISALLOW_COPY_AND_ASSIGN(MockAudioManager); | 86 DISALLOW_COPY_AND_ASSIGN(MockAudioManager); |
94 }; | 87 }; |
95 | 88 |
96 } // namespace media. | 89 } // namespace media. |
97 | 90 |
98 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ | 91 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ |
OLD | NEW |