| 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 #include "media/audio/mock_audio_manager.h" | 5 #include "media/audio/mock_audio_manager.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "media/base/audio_parameters.h" | 10 #include "media/base/audio_parameters.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 MockAudioManager::MockAudioManager(std::unique_ptr<AudioThread> audio_thread) | 14 MockAudioManager::MockAudioManager(std::unique_ptr<AudioThread> audio_thread) |
| 15 : AudioManager(std::move(audio_thread)) {} | 15 : AudioManager(std::move(audio_thread)) {} |
| 16 | 16 |
| 17 MockAudioManager::~MockAudioManager() { | 17 MockAudioManager::~MockAudioManager() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 void MockAudioManager::ShutdownOnAudioThread() {} | 20 void MockAudioManager::ShutdownOnAudioThread(bool) {} |
| 21 | 21 |
| 22 bool MockAudioManager::HasAudioOutputDevices() { | 22 bool MockAudioManager::HasAudioOutputDevices() { |
| 23 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); | 23 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); |
| 24 return has_output_devices_; | 24 return has_output_devices_; |
| 25 } | 25 } |
| 26 | 26 |
| 27 bool MockAudioManager::HasAudioInputDevices() { | 27 bool MockAudioManager::HasAudioInputDevices() { |
| 28 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); | 28 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); |
| 29 return has_input_devices_; | 29 return has_input_devices_; |
| 30 } | 30 } |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 GetDeviceDescriptionsCallback callback) { | 155 GetDeviceDescriptionsCallback callback) { |
| 156 get_output_device_descriptions_cb_ = std::move(callback); | 156 get_output_device_descriptions_cb_ = std::move(callback); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void MockAudioManager::SetAssociatedOutputDeviceIDCallback( | 159 void MockAudioManager::SetAssociatedOutputDeviceIDCallback( |
| 160 GetAssociatedOutputDeviceIDCallback callback) { | 160 GetAssociatedOutputDeviceIDCallback callback) { |
| 161 get_associated_output_device_id_cb_ = std::move(callback); | 161 get_associated_output_device_id_cb_ = std::move(callback); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace media. | 164 } // namespace media. |
| OLD | NEW |