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

Side by Side Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 12258042: Rewrite WebContentsVideoCaptureDeviceTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refiddle test exclusions. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/media/web_contents_capture_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 media::FakeVideoCaptureDevice::Create(vc_device_name); 167 media::FakeVideoCaptureDevice::Create(vc_device_name);
168 } else { 168 } else {
169 switch (device.device.type) { 169 switch (device.device.type) {
170 case MEDIA_DEVICE_VIDEO_CAPTURE: { 170 case MEDIA_DEVICE_VIDEO_CAPTURE: {
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); 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(OS_MACOSX) || defined(OS_WIN)
182 CHECK(CommandLine::ForCurrentProcess()->HasSwitch( 182 CHECK(CommandLine::ForCurrentProcess()->HasSwitch(
183 switches::kEnableUserMediaScreenCapturing)); 183 switches::kEnableUserMediaScreenCapturing));
184 scoped_refptr<base::SequencedWorkerPool> blocking_pool = 184 scoped_refptr<base::SequencedWorkerPool> blocking_pool =
185 BrowserThread::GetBlockingPool(); 185 BrowserThread::GetBlockingPool();
186 video_capture_device = new media::ScreenCaptureDevice( 186 video_capture_device = new media::ScreenCaptureDevice(
187 blocking_pool->GetSequencedTaskRunner( 187 blocking_pool->GetSequencedTaskRunner(
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 552
553 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id); 553 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id);
554 if (dit != devices_.end()) { 554 if (dit != devices_.end()) {
555 return dit->second.capture_device; 555 return dit->second.capture_device;
556 } 556 }
557 } 557 }
558 return NULL; 558 return NULL;
559 } 559 }
560 560
561 } // namespace content 561 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/web_contents_capture_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698