| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/renderer_host/media/web_contents_audio_input_stream.h" | 5 #include "content/browser/renderer_host/media/web_contents_audio_input_stream.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 DCHECK(message_loop_->BelongsToCurrentThread()); | 197 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 198 | 198 |
| 199 return target_render_process_id_ <= 0 || target_render_view_id_ <= 0; | 199 return target_render_process_id_ <= 0 || target_render_view_id_ <= 0; |
| 200 } | 200 } |
| 201 | 201 |
| 202 void WebContentsAudioInputStream::Impl::ReportError() { | 202 void WebContentsAudioInputStream::Impl::ReportError() { |
| 203 DCHECK(message_loop_->BelongsToCurrentThread()); | 203 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 204 | 204 |
| 205 // TODO(miu): Need clean-up of AudioInputCallback interface in a future | 205 // TODO(miu): Need clean-up of AudioInputCallback interface in a future |
| 206 // change, since its only implementation ignores the first argument entirely | 206 // change, since its only implementation ignores the first argument entirely |
| 207 // and the values for the second argument are undefined. | 207 callback_->OnError(NULL); |
| 208 callback_->OnError(NULL, 0); | |
| 209 } | 208 } |
| 210 | 209 |
| 211 void WebContentsAudioInputStream::Impl::StartMirroring() { | 210 void WebContentsAudioInputStream::Impl::StartMirroring() { |
| 212 DCHECK(message_loop_->BelongsToCurrentThread()); | 211 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 213 | 212 |
| 214 BrowserThread::PostTask( | 213 BrowserThread::PostTask( |
| 215 BrowserThread::IO, | 214 BrowserThread::IO, |
| 216 FROM_HERE, | 215 FROM_HERE, |
| 217 base::Bind(&AudioMirroringManager::StartMirroring, | 216 base::Bind(&AudioMirroringManager::StartMirroring, |
| 218 base::Unretained(mirroring_manager_), | 217 base::Unretained(mirroring_manager_), |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 338 |
| 340 void WebContentsAudioInputStream::SetAutomaticGainControl(bool enabled) { | 339 void WebContentsAudioInputStream::SetAutomaticGainControl(bool enabled) { |
| 341 impl_->mixer_stream()->SetAutomaticGainControl(enabled); | 340 impl_->mixer_stream()->SetAutomaticGainControl(enabled); |
| 342 } | 341 } |
| 343 | 342 |
| 344 bool WebContentsAudioInputStream::GetAutomaticGainControl() { | 343 bool WebContentsAudioInputStream::GetAutomaticGainControl() { |
| 345 return impl_->mixer_stream()->GetAutomaticGainControl(); | 344 return impl_->mixer_stream()->GetAutomaticGainControl(); |
| 346 } | 345 } |
| 347 | 346 |
| 348 } // namespace content | 347 } // namespace content |
| OLD | NEW |