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 "content/browser/renderer_host/media/video_capture_manager.h" | 5 #include "content/browser/renderer_host/media/video_capture_manager.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 video_capture_device = | 171 video_capture_device = |
172 media::VideoCaptureDevice::Create(vc_device_name); | 172 media::VideoCaptureDevice::Create(vc_device_name); |
173 break; | 173 break; |
174 } | 174 } |
175 case MEDIA_TAB_VIDEO_CAPTURE: { | 175 case MEDIA_TAB_VIDEO_CAPTURE: { |
176 video_capture_device = WebContentsVideoCaptureDevice::Create( | 176 video_capture_device = WebContentsVideoCaptureDevice::Create( |
177 vc_device_name.unique_id, base::Closure()); | 177 vc_device_name.unique_id, base::Closure()); |
178 break; | 178 break; |
179 } | 179 } |
180 case MEDIA_SCREEN_VIDEO_CAPTURE: { | 180 case MEDIA_SCREEN_VIDEO_CAPTURE: { |
181 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) | 181 #if (defined(OS_LINUX) && defined(USE_X11)) || \ |
| 182 defined(OS_MACOSX) || defined(OS_WIN) |
182 CHECK(CommandLine::ForCurrentProcess()->HasSwitch( | 183 CHECK(CommandLine::ForCurrentProcess()->HasSwitch( |
183 switches::kEnableUserMediaScreenCapturing)); | 184 switches::kEnableUserMediaScreenCapturing)); |
184 scoped_refptr<base::SequencedWorkerPool> blocking_pool = | 185 scoped_refptr<base::SequencedWorkerPool> blocking_pool = |
185 BrowserThread::GetBlockingPool(); | 186 BrowserThread::GetBlockingPool(); |
186 video_capture_device = new media::ScreenCaptureDevice( | 187 video_capture_device = new media::ScreenCaptureDevice( |
187 blocking_pool->GetSequencedTaskRunner( | 188 blocking_pool->GetSequencedTaskRunner( |
188 blocking_pool->GetSequenceToken())); | 189 blocking_pool->GetSequenceToken())); |
189 #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) | 190 #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) |
190 break; | 191 break; |
191 } | 192 } |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 | 553 |
553 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id); | 554 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id); |
554 if (dit != devices_.end()) { | 555 if (dit != devices_.end()) { |
555 return dit->second.capture_device; | 556 return dit->second.capture_device; |
556 } | 557 } |
557 } | 558 } |
558 return NULL; | 559 return NULL; |
559 } | 560 } |
560 | 561 |
561 } // namespace content | 562 } // namespace content |
OLD | NEW |