Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(953)

Unified Diff: media/audio/test_audio_input_controller_factory.cc

Issue 2624403002: Refactor AudioInputController and related interfaces. (Closed)
Patch Set: Address comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/test_audio_input_controller_factory.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/test_audio_input_controller_factory.cc
diff --git a/media/audio/test_audio_input_controller_factory.cc b/media/audio/test_audio_input_controller_factory.cc
index fb70e32af12fcaa39bcffd756653b3549ba84e56..1766b9250f28f8b655377633acf965afc2d8bbb0 100644
--- a/media/audio/test_audio_input_controller_factory.cc
+++ b/media/audio/test_audio_input_controller_factory.cc
@@ -15,16 +15,16 @@ TestAudioInputController::TestAudioInputController(
EventHandler* event_handler,
SyncWriter* sync_writer,
UserInputMonitor* user_input_monitor)
- : AudioInputController(event_handler,
+ : AudioInputController(audio_manager->GetTaskRunner(),
+ event_handler,
sync_writer,
nullptr,
user_input_monitor,
false),
audio_parameters_(audio_parameters),
factory_(factory),
- event_handler_(event_handler) {
- task_runner_ = audio_manager->GetTaskRunner();
-}
+ event_handler_(event_handler),
+ sync_writer_(sync_writer) {}
TestAudioInputController::~TestAudioInputController() {
// Inform the factory so that it allows creating new instances in future.
@@ -37,7 +37,7 @@ void TestAudioInputController::Record() {
}
void TestAudioInputController::Close(const base::Closure& closed_task) {
- task_runner_->PostTask(FROM_HERE, closed_task);
+ GetTaskRunnerForTesting()->PostTask(FROM_HERE, closed_task);
if (factory_->delegate_)
factory_->delegate_->TestAudioControllerClosed(this);
}
@@ -59,8 +59,9 @@ AudioInputController* TestAudioInputControllerFactory::Create(
AudioParameters params,
UserInputMonitor* user_input_monitor) {
DCHECK(!controller_); // Only one test instance managed at a time.
- controller_ = new TestAudioInputController(
- this, audio_manager, params, event_handler, NULL, user_input_monitor);
+ controller_ =
+ new TestAudioInputController(this, audio_manager, params, event_handler,
+ sync_writer, user_input_monitor);
return controller_;
}
« no previous file with comments | « media/audio/test_audio_input_controller_factory.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698