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

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

Issue 12563002: x11: Include X11 dependencies only when building with X11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 | « build/linux/system.gyp ('k') | content/content_browser.gypi » ('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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « build/linux/system.gyp ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698