| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "media/audio/audio_parameters.h" | 9 #include "media/audio/audio_parameters.h" |
| 10 | 10 |
| 11 namespace media { | 11 namespace media { |
| 12 | 12 |
| 13 MockAudioManager::MockAudioManager(base::MessageLoopProxy* message_loop_proxy) | 13 MockAudioManager::MockAudioManager( |
| 14 : message_loop_proxy_(message_loop_proxy) { | 14 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) |
| 15 } | 15 : task_runner_(task_runner) {} |
| 16 | 16 |
| 17 MockAudioManager::~MockAudioManager() { | 17 MockAudioManager::~MockAudioManager() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 bool MockAudioManager::HasAudioOutputDevices() { | 20 bool MockAudioManager::HasAudioOutputDevices() { |
| 21 return true; | 21 return true; |
| 22 } | 22 } |
| 23 | 23 |
| 24 bool MockAudioManager::HasAudioInputDevices() { | 24 bool MockAudioManager::HasAudioInputDevices() { |
| 25 return true; | 25 return true; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 return NULL; | 61 return NULL; |
| 62 } | 62 } |
| 63 | 63 |
| 64 media::AudioInputStream* MockAudioManager::MakeAudioInputStream( | 64 media::AudioInputStream* MockAudioManager::MakeAudioInputStream( |
| 65 const media::AudioParameters& params, | 65 const media::AudioParameters& params, |
| 66 const std::string& device_id) { | 66 const std::string& device_id) { |
| 67 NOTREACHED(); | 67 NOTREACHED(); |
| 68 return NULL; | 68 return NULL; |
| 69 } | 69 } |
| 70 | 70 |
| 71 scoped_refptr<base::MessageLoopProxy> MockAudioManager::GetMessageLoop() { | 71 scoped_refptr<base::SingleThreadTaskRunner> MockAudioManager::GetTaskRunner() { |
| 72 return message_loop_proxy_; | 72 return task_runner_; |
| 73 } | 73 } |
| 74 | 74 |
| 75 scoped_refptr<base::MessageLoopProxy> MockAudioManager::GetWorkerLoop() { | 75 scoped_refptr<base::SingleThreadTaskRunner> |
| 76 return message_loop_proxy_; | 76 MockAudioManager::GetWorkerTaskRunner() { |
| 77 return task_runner_; |
| 77 } | 78 } |
| 78 | 79 |
| 79 void MockAudioManager::AddOutputDeviceChangeListener( | 80 void MockAudioManager::AddOutputDeviceChangeListener( |
| 80 AudioDeviceListener* listener) { | 81 AudioDeviceListener* listener) { |
| 81 } | 82 } |
| 82 | 83 |
| 83 void MockAudioManager::RemoveOutputDeviceChangeListener( | 84 void MockAudioManager::RemoveOutputDeviceChangeListener( |
| 84 AudioDeviceListener* listener) { | 85 AudioDeviceListener* listener) { |
| 85 } | 86 } |
| 86 | 87 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 104 } | 105 } |
| 105 | 106 |
| 106 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog( | 107 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog( |
| 107 AudioLogFactory::AudioComponent component) { | 108 AudioLogFactory::AudioComponent component) { |
| 108 return scoped_ptr<AudioLog>(); | 109 return scoped_ptr<AudioLog>(); |
| 109 } | 110 } |
| 110 | 111 |
| 111 void MockAudioManager::FixWedgedAudio() {} | 112 void MockAudioManager::FixWedgedAudio() {} |
| 112 | 113 |
| 113 } // namespace media. | 114 } // namespace media. |
| OLD | NEW |