| 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/test_audio_input_controller_factory.h" | 5 #include "media/audio/test_audio_input_controller_factory.h" |
| 6 #include "media/audio/audio_input_writer.h" |
| 6 #include "media/audio/audio_io.h" | 7 #include "media/audio/audio_io.h" |
| 7 | 8 |
| 8 namespace media { | 9 namespace media { |
| 9 | 10 |
| 10 TestAudioInputController::TestAudioInputController( | 11 TestAudioInputController::TestAudioInputController( |
| 11 TestAudioInputControllerFactory* factory, | 12 TestAudioInputControllerFactory* factory, |
| 12 AudioManager* audio_manager, | 13 AudioManager* audio_manager, |
| 13 const AudioParameters& audio_parameters, | 14 const AudioParameters& audio_parameters, |
| 14 EventHandler* event_handler, | 15 EventHandler* event_handler, |
| 15 SyncWriter* sync_writer, | 16 SyncWriter* sync_writer, |
| 16 UserInputMonitor* user_input_monitor) | 17 UserInputMonitor* user_input_monitor) |
| 17 : AudioInputController(event_handler, | 18 : AudioInputController(event_handler, |
| 18 sync_writer, | 19 sync_writer, |
| 20 nullptr, |
| 19 user_input_monitor, | 21 user_input_monitor, |
| 20 false), | 22 false), |
| 21 audio_parameters_(audio_parameters), | 23 audio_parameters_(audio_parameters), |
| 22 factory_(factory), | 24 factory_(factory), |
| 23 event_handler_(event_handler) { | 25 event_handler_(event_handler) { |
| 24 task_runner_ = audio_manager->GetTaskRunner(); | 26 task_runner_ = audio_manager->GetTaskRunner(); |
| 25 } | 27 } |
| 26 | 28 |
| 27 TestAudioInputController::~TestAudioInputController() { | 29 TestAudioInputController::~TestAudioInputController() { |
| 28 // Inform the factory so that it allows creating new instances in future. | 30 // Inform the factory so that it allows creating new instances in future. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return controller_; | 62 return controller_; |
| 61 } | 63 } |
| 62 | 64 |
| 63 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( | 65 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( |
| 64 TestAudioInputController* controller) { | 66 TestAudioInputController* controller) { |
| 65 DCHECK_EQ(controller_, controller); | 67 DCHECK_EQ(controller_, controller); |
| 66 controller_ = NULL; | 68 controller_ = NULL; |
| 67 } | 69 } |
| 68 | 70 |
| 69 } // namespace media | 71 } // namespace media |
| OLD | NEW |