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/fake_audio_input_stream.h" | 5 #include "media/audio/fake_audio_input_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 << switches::kUseFileForFakeAudioCapture | 120 << switches::kUseFileForFakeAudioCapture |
121 << "."; | 121 << "."; |
122 base::FilePath path_to_wav_file = base::FilePath(parameters[0]); | 122 base::FilePath path_to_wav_file = base::FilePath(parameters[0]); |
123 bool looping = true; | 123 bool looping = true; |
124 if (parameters.size() == 2) { | 124 if (parameters.size() == 2) { |
125 CHECK(parameters[1] == FILE_PATH_LITERAL("noloop")) | 125 CHECK(parameters[1] == FILE_PATH_LITERAL("noloop")) |
126 << "Unknown parameter " << parameters[1] << " to " | 126 << "Unknown parameter " << parameters[1] << " to " |
127 << switches::kUseFileForFakeAudioCapture << "."; | 127 << switches::kUseFileForFakeAudioCapture << "."; |
128 looping = false; | 128 looping = false; |
129 } | 129 } |
130 return base::WrapUnique(new FileSource(params_, path_to_wav_file, looping)); | 130 return base::MakeUnique<FileSource>(params_, path_to_wav_file, looping); |
131 } | 131 } |
132 return base::WrapUnique(new BeepingSource(params_)); | 132 return base::MakeUnique<BeepingSource>(params_); |
133 } | 133 } |
134 | 134 |
135 void FakeAudioInputStream::BeepOnce() { | 135 void FakeAudioInputStream::BeepOnce() { |
136 BeepingSource::BeepOnce(); | 136 BeepingSource::BeepOnce(); |
137 } | 137 } |
138 | 138 |
139 } // namespace media | 139 } // namespace media |
OLD | NEW |