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

Unified Diff: media/capture/video/video_capture_device_factory.cc

Issue 2143903003: [WIP] Move media/capture to device/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « media/capture/video/video_capture_device_factory.h ('k') | media/capture/video/video_capture_device_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/video_capture_device_factory.cc
diff --git a/media/capture/video/video_capture_device_factory.cc b/media/capture/video/video_capture_device_factory.cc
deleted file mode 100644
index 39aa62aba6fa0d0eda0c4511f781cd3ab754e3a4..0000000000000000000000000000000000000000
--- a/media/capture/video/video_capture_device_factory.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/capture/video/video_capture_device_factory.h"
-
-#include <utility>
-
-#include "base/command_line.h"
-#include "build/build_config.h"
-#include "media/base/media_switches.h"
-#include "media/capture/video/fake_video_capture_device_factory.h"
-#include "media/capture/video/file_video_capture_device_factory.h"
-
-namespace media {
-
-// static
-std::unique_ptr<VideoCaptureDeviceFactory>
-VideoCaptureDeviceFactory::CreateFactory(
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- // Use a Fake or File Video Device Factory if the command line flags are
- // present, otherwise use the normal, platform-dependent, device factory.
- if (command_line->HasSwitch(switches::kUseFakeDeviceForMediaStream)) {
- if (command_line->HasSwitch(switches::kUseFileForFakeVideoCapture)) {
- return std::unique_ptr<VideoCaptureDeviceFactory>(
- new media::FileVideoCaptureDeviceFactory());
- } else {
- return std::unique_ptr<VideoCaptureDeviceFactory>(
- new media::FakeVideoCaptureDeviceFactory());
- }
- } else {
- // |ui_task_runner| is needed for the Linux ChromeOS factory to retrieve
- // screen rotations.
- return std::unique_ptr<VideoCaptureDeviceFactory>(
- CreateVideoCaptureDeviceFactory(ui_task_runner));
- }
-}
-
-VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {
- thread_checker_.DetachFromThread();
-}
-
-VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {
-}
-
-void VideoCaptureDeviceFactory::EnumerateDeviceNames(
- const base::Callback<
- void(std::unique_ptr<media::VideoCaptureDevice::Names>)>& callback) {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(!callback.is_null());
- std::unique_ptr<VideoCaptureDevice::Names> device_names(
- new VideoCaptureDevice::Names());
- GetDeviceNames(device_names.get());
- callback.Run(std::move(device_names));
-}
-
-#if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \
- !defined(OS_WIN)
-// static
-VideoCaptureDeviceFactory*
-VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
- NOTIMPLEMENTED();
- return NULL;
-}
-#endif
-
-} // namespace media
« no previous file with comments | « media/capture/video/video_capture_device_factory.h ('k') | media/capture/video/video_capture_device_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698