| 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 : AudioInputController(event_handler, sync_writer, user_input_monitor), | 17 : AudioInputController(event_handler, |
| 18 sync_writer, |
| 19 user_input_monitor, |
| 20 false), |
| 18 audio_parameters_(audio_parameters), | 21 audio_parameters_(audio_parameters), |
| 19 factory_(factory), | 22 factory_(factory), |
| 20 event_handler_(event_handler) { | 23 event_handler_(event_handler) { |
| 21 task_runner_ = audio_manager->GetTaskRunner(); | 24 task_runner_ = audio_manager->GetTaskRunner(); |
| 22 } | 25 } |
| 23 | 26 |
| 24 TestAudioInputController::~TestAudioInputController() { | 27 TestAudioInputController::~TestAudioInputController() { |
| 25 // Inform the factory so that it allows creating new instances in future. | 28 // Inform the factory so that it allows creating new instances in future. |
| 26 factory_->OnTestAudioInputControllerDestroyed(this); | 29 factory_->OnTestAudioInputControllerDestroyed(this); |
| 27 } | 30 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 return controller_; | 60 return controller_; |
| 58 } | 61 } |
| 59 | 62 |
| 60 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( | 63 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( |
| 61 TestAudioInputController* controller) { | 64 TestAudioInputController* controller) { |
| 62 DCHECK_EQ(controller_, controller); | 65 DCHECK_EQ(controller_, controller); |
| 63 controller_ = NULL; | 66 controller_ = NULL; |
| 64 } | 67 } |
| 65 | 68 |
| 66 } // namespace media | 69 } // namespace media |
| OLD | NEW |