| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 AudioParameters GetOutputStreamParameters( | 62 AudioParameters GetOutputStreamParameters( |
| 63 const std::string& device_id) override; | 63 const std::string& device_id) override; |
| 64 AudioParameters GetInputStreamParameters( | 64 AudioParameters GetInputStreamParameters( |
| 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 void InitializeOutputDebugRecording( |
| 73 AudioFileWriter::CreateCallback create_audio_file_writer_callback) |
| 74 override; |
| 75 void EnableOutputDebugRecording( |
| 76 const base::FilePath& base_file_name) override; |
| 77 void DisableOutputDebugRecording() override; |
| 78 |
| 72 const char* GetName() override; | 79 const char* GetName() override; |
| 73 | 80 |
| 74 // Setters to emulate desired in-test behavior. | 81 // Setters to emulate desired in-test behavior. |
| 75 void SetInputStreamParameters(const AudioParameters& input_params); | 82 void SetInputStreamParameters(const AudioParameters& input_params); |
| 76 void SetHasInputDevices(bool has_input_devices); | 83 void SetHasInputDevices(bool has_input_devices); |
| 77 | 84 |
| 78 protected: | 85 protected: |
| 79 ~MockAudioManager() override; | 86 ~MockAudioManager() override; |
| 80 | 87 |
| 81 private: | 88 private: |
| 82 friend class base::DeleteHelper<MockAudioManager>; | 89 friend class base::DeleteHelper<MockAudioManager>; |
| 83 AudioParameters input_params_; | 90 AudioParameters input_params_; |
| 84 bool has_input_devices_ = true; | 91 bool has_input_devices_ = true; |
| 85 | 92 |
| 86 DISALLOW_COPY_AND_ASSIGN(MockAudioManager); | 93 DISALLOW_COPY_AND_ASSIGN(MockAudioManager); |
| 87 }; | 94 }; |
| 88 | 95 |
| 89 } // namespace media. | 96 } // namespace media. |
| 90 | 97 |
| 91 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ | 98 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ |
| OLD | NEW |