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

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

Issue 720043003: Use factory method to create VideoCaptureDeviceFactory . (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes by review comments. Created 6 years, 1 month 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: media/video/capture/video_capture_device_factory.cc
diff --git a/media/video/capture/video_capture_device_factory.cc b/media/video/capture/video_capture_device_factory.cc
index 00a8f7ec3d4c6d2d34899a17818ce9399d4af11e..73888e0b1d650d257446e865e363e4595d841388 100644
--- a/media/video/capture/video_capture_device_factory.cc
+++ b/media/video/capture/video_capture_device_factory.cc
@@ -9,16 +9,6 @@
#include "media/video/capture/fake_video_capture_device_factory.h"
#include "media/video/capture/file_video_capture_device_factory.h"
-#if defined(OS_MACOSX)
-#include "media/video/capture/mac/video_capture_device_factory_mac.h"
-#elif defined(OS_LINUX)
-#include "media/video/capture/linux/video_capture_device_factory_linux.h"
-#elif defined(OS_ANDROID)
-#include "media/video/capture/android/video_capture_device_factory_android.h"
-#elif defined(OS_WIN)
-#include "media/video/capture/win/video_capture_device_factory_win.h"
-#endif
-
namespace media {
// static
@@ -38,22 +28,8 @@ scoped_ptr<VideoCaptureDeviceFactory> VideoCaptureDeviceFactory::CreateFactory(
} else {
// |ui_task_runner| is needed for the Linux ChromeOS factory to retrieve
// screen rotations and for the Mac factory to run QTKit device enumeration.
-#if defined(OS_MACOSX)
- return scoped_ptr<VideoCaptureDeviceFactory>(new
- VideoCaptureDeviceFactoryMac(ui_task_runner));
-#elif defined(OS_LINUX)
- return scoped_ptr<VideoCaptureDeviceFactory>(new
- VideoCaptureDeviceFactoryLinux(ui_task_runner));
-#elif defined(OS_ANDROID)
- return scoped_ptr<VideoCaptureDeviceFactory>(new
- VideoCaptureDeviceFactoryAndroid());
-#elif defined(OS_WIN)
- return scoped_ptr<VideoCaptureDeviceFactory>(new
- VideoCaptureDeviceFactoryWin());
-#else
- return scoped_ptr<VideoCaptureDeviceFactory>(new
- VideoCaptureDeviceFactory());
-#endif
+ return scoped_ptr<VideoCaptureDeviceFactory>(
+ CreateVideoCaptureDeviceFactory(ui_task_runner));
}
}
@@ -73,4 +49,14 @@ void VideoCaptureDeviceFactory::EnumerateDeviceNames(const base::Callback<
callback.Run(device_names.Pass());
}
+#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/video/capture/video_capture_device_factory.h ('k') | media/video/capture/win/video_capture_device_factory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698