Chromium Code Reviews| 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/media/capture/web_contents_audio_input_stream.h" | 5 #include "content/browser/media/capture/web_contents_audio_input_stream.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 342 StartMirroring(); | 342 StartMirroring(); |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 } | 345 } |
| 346 | 346 |
| 347 // static | 347 // static |
| 348 WebContentsAudioInputStream* WebContentsAudioInputStream::Create( | 348 WebContentsAudioInputStream* WebContentsAudioInputStream::Create( |
| 349 const std::string& device_id, | 349 const std::string& device_id, |
| 350 const media::AudioParameters& params, | 350 const media::AudioParameters& params, |
| 351 const scoped_refptr<base::SingleThreadTaskRunner>& worker_task_runner, | 351 const scoped_refptr<base::SingleThreadTaskRunner>& worker_task_runner, |
| 352 AudioMirroringManager* audio_mirroring_manager) { | 352 AudioMirroringManager* audio_mirroring_manager, |
| 353 bool is_duplication) { | |
| 353 int render_process_id; | 354 int render_process_id; |
| 354 int main_render_frame_id; | 355 int main_render_frame_id; |
| 355 if (!WebContentsMediaCaptureId::ExtractTabCaptureTarget( | 356 if (!WebContentsMediaCaptureId::ExtractTabCaptureTarget( |
| 356 device_id, &render_process_id, &main_render_frame_id)) { | 357 device_id, &render_process_id, &main_render_frame_id)) { |
| 357 return NULL; | 358 return NULL; |
| 358 } | 359 } |
| 359 | 360 |
| 360 // TODO(qiangchen): Plug in true for the case of Tab Typed Desktop Share. | 361 // TODO(qiangchen): Plug in true for the case of Tab Typed Desktop Share. |
|
miu
2016/06/20 20:42:00
Looks like you can remove this TODO comment now. ;
qiangchen
2016/06/21 16:12:15
Done.
| |
| 361 return new WebContentsAudioInputStream( | 362 return new WebContentsAudioInputStream( |
| 362 render_process_id, main_render_frame_id, audio_mirroring_manager, | 363 render_process_id, main_render_frame_id, audio_mirroring_manager, |
| 363 new WebContentsTracker(false), | 364 new WebContentsTracker(false), |
| 364 new media::VirtualAudioInputStream( | 365 new media::VirtualAudioInputStream( |
| 365 params, worker_task_runner, | 366 params, worker_task_runner, |
| 366 media::VirtualAudioInputStream::AfterCloseCallback()), | 367 media::VirtualAudioInputStream::AfterCloseCallback()), |
| 367 false); | 368 is_duplication); |
| 368 } | 369 } |
| 369 | 370 |
| 370 WebContentsAudioInputStream::WebContentsAudioInputStream( | 371 WebContentsAudioInputStream::WebContentsAudioInputStream( |
| 371 int render_process_id, | 372 int render_process_id, |
| 372 int main_render_frame_id, | 373 int main_render_frame_id, |
| 373 AudioMirroringManager* mirroring_manager, | 374 AudioMirroringManager* mirroring_manager, |
| 374 const scoped_refptr<WebContentsTracker>& tracker, | 375 const scoped_refptr<WebContentsTracker>& tracker, |
| 375 media::VirtualAudioInputStream* mixer_stream, | 376 media::VirtualAudioInputStream* mixer_stream, |
| 376 bool is_duplication) | 377 bool is_duplication) |
| 377 : impl_(new Impl(render_process_id, | 378 : impl_(new Impl(render_process_id, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 418 | 419 |
| 419 bool WebContentsAudioInputStream::GetAutomaticGainControl() { | 420 bool WebContentsAudioInputStream::GetAutomaticGainControl() { |
| 420 return impl_->mixer_stream()->GetAutomaticGainControl(); | 421 return impl_->mixer_stream()->GetAutomaticGainControl(); |
| 421 } | 422 } |
| 422 | 423 |
| 423 bool WebContentsAudioInputStream::IsMuted() { | 424 bool WebContentsAudioInputStream::IsMuted() { |
| 424 return false; | 425 return false; |
| 425 } | 426 } |
| 426 | 427 |
| 427 } // namespace content | 428 } // namespace content |
| OLD | NEW |