| 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_io.h" | 6 #include "media/audio/audio_io.h" |
| 7 | 7 |
| 8 namespace media { | 8 namespace media { |
| 9 | 9 |
| 10 TestAudioInputController::TestAudioInputController( | 10 TestAudioInputController::TestAudioInputController( |
| 11 TestAudioInputControllerFactory* factory, | 11 TestAudioInputControllerFactory* factory, |
| 12 AudioManager* audio_manager, | 12 AudioManager* audio_manager, |
| 13 const AudioParameters& audio_parameters, | 13 const AudioParameters& audio_parameters, |
| 14 EventHandler* event_handler, | 14 EventHandler* event_handler, |
| 15 SyncWriter* sync_writer, | 15 SyncWriter* sync_writer, |
| 16 UserInputMonitor* user_input_monitor, | 16 UserInputMonitor* user_input_monitor, |
| 17 StreamType type) | 17 StreamType type) |
| 18 : AudioInputController(audio_manager->GetTaskRunner(), | 18 : AudioInputController(audio_manager->GetTaskRunner(), |
| 19 event_handler, | 19 event_handler, |
| 20 sync_writer, | 20 sync_writer, |
| 21 user_input_monitor, | 21 user_input_monitor, |
| 22 audio_parameters, | 22 audio_parameters, |
| 23 type, | 23 type), |
| 24 audio_manager->GetTaskRunner()), | |
| 25 audio_parameters_(audio_parameters), | 24 audio_parameters_(audio_parameters), |
| 26 factory_(factory), | 25 factory_(factory), |
| 27 event_handler_(event_handler), | 26 event_handler_(event_handler), |
| 28 sync_writer_(sync_writer) {} | 27 sync_writer_(sync_writer) {} |
| 29 | 28 |
| 30 TestAudioInputController::~TestAudioInputController() { | 29 TestAudioInputController::~TestAudioInputController() { |
| 31 // 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. |
| 32 factory_->OnTestAudioInputControllerDestroyed(this); | 31 factory_->OnTestAudioInputControllerDestroyed(this); |
| 33 } | 32 } |
| 34 | 33 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return controller_; | 66 return controller_; |
| 68 } | 67 } |
| 69 | 68 |
| 70 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( | 69 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( |
| 71 TestAudioInputController* controller) { | 70 TestAudioInputController* controller) { |
| 72 DCHECK_EQ(controller_, controller); | 71 DCHECK_EQ(controller_, controller); |
| 73 controller_ = NULL; | 72 controller_ = NULL; |
| 74 } | 73 } |
| 75 | 74 |
| 76 } // namespace media | 75 } // namespace media |
| OLD | NEW |