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

Unified Diff: content/browser/media/capture/web_contents_video_capture_device.cc

Issue 2291893002: Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 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
Index: content/browser/media/capture/web_contents_video_capture_device.cc
diff --git a/content/browser/media/capture/web_contents_video_capture_device.cc b/content/browser/media/capture/web_contents_video_capture_device.cc
index e475cbd03d228c4c9ff797225706cf5fcf605d49..1f24693ec7881c1e66f043e3563b66a00f459264 100644
--- a/content/browser/media/capture/web_contents_video_capture_device.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device.cc
@@ -992,19 +992,18 @@ WebContentsVideoCaptureDevice::~WebContentsVideoCaptureDevice() {
}
// static
-media::VideoCaptureDevice* WebContentsVideoCaptureDevice::Create(
- const std::string& device_id) {
+std::unique_ptr<media::VideoCaptureDevice>
+WebContentsVideoCaptureDevice::Create(const std::string& device_id) {
// Parse device_id into render_process_id and main_render_frame_id.
- int render_process_id = -1;
- int main_render_frame_id = -1;
- if (!WebContentsMediaCaptureId::ExtractTabCaptureTarget(
- device_id, &render_process_id, &main_render_frame_id)) {
+ WebContentsMediaCaptureId media_id;
+ if (!WebContentsMediaCaptureId::Parse(device_id, &media_id)) {
return NULL;
}
- return new WebContentsVideoCaptureDevice(
- render_process_id, main_render_frame_id,
- WebContentsMediaCaptureId::IsAutoThrottlingOptionSet(device_id));
+ return std::unique_ptr<media::VideoCaptureDevice>(
+ new WebContentsVideoCaptureDevice(media_id.render_process_id,
+ media_id.main_render_frame_id,
+ media_id.enable_auto_throttling));
}
void WebContentsVideoCaptureDevice::AllocateAndStart(

Powered by Google App Engine
This is Rietveld 408576698