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

Side by Side Diff: media/audio/test_audio_input_controller_factory.cc

Issue 2531333005: Unit tests of AudioInputRendererHost. Some cleanups. (Closed)
Patch Set: Small comments describing tests. Created 4 years 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 unified diff | Download patch
OLDNEW
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_input_writer.h"
7 #include "media/audio/audio_io.h" 7 #include "media/audio/audio_io.h"
8 8
9 namespace media { 9 namespace media {
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 TestAudioInputControllerFactory::TestAudioInputControllerFactory() 45 TestAudioInputControllerFactory::TestAudioInputControllerFactory()
46 : controller_(NULL), 46 : controller_(NULL),
47 delegate_(NULL) { 47 delegate_(NULL) {
48 } 48 }
49 49
50 TestAudioInputControllerFactory::~TestAudioInputControllerFactory() { 50 TestAudioInputControllerFactory::~TestAudioInputControllerFactory() {
51 DCHECK(!controller_); 51 DCHECK(!controller_);
52 } 52 }
53 53
54 AudioInputController* TestAudioInputControllerFactory::Create( 54 AudioInputController* TestAudioInputControllerFactory::Create(
55 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
56 AudioInputController::SyncWriter* sync_writer,
55 AudioManager* audio_manager, 57 AudioManager* audio_manager,
56 AudioInputController::EventHandler* event_handler, 58 AudioInputController::EventHandler* event_handler,
57 AudioParameters params, 59 AudioParameters params,
58 UserInputMonitor* user_input_monitor) { 60 UserInputMonitor* user_input_monitor) {
59 DCHECK(!controller_); // Only one test instance managed at a time. 61 DCHECK(!controller_); // Only one test instance managed at a time.
60 controller_ = new TestAudioInputController( 62 controller_ = new TestAudioInputController(
61 this, audio_manager, params, event_handler, NULL, user_input_monitor); 63 this, audio_manager, params, event_handler, NULL, user_input_monitor);
62 return controller_; 64 return controller_;
63 } 65 }
64 66
65 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed( 67 void TestAudioInputControllerFactory::OnTestAudioInputControllerDestroyed(
66 TestAudioInputController* controller) { 68 TestAudioInputController* controller) {
67 DCHECK_EQ(controller_, controller); 69 DCHECK_EQ(controller_, controller);
68 controller_ = NULL; 70 controller_ = NULL;
69 } 71 }
70 72
71 } // namespace media 73 } // namespace media
OLDNEW
« 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