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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 1140113002: Implement screen capture for android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ScreenCaptureMachineAndroid which inherited from content::VideoCaptureMachine Created 5 years, 7 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
Index: content/browser/renderer_host/media/video_capture_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index a213a564babffd70f7afcbd93478a215a85084b3..d641b952136a10101249b7fa80a8b7a87c46119c 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -28,6 +28,9 @@
#if defined(ENABLE_SCREEN_CAPTURE)
#include "content/browser/media/capture/desktop_capture_device.h"
+#if defined(OS_ANDROID)
+#include "media/screen_capture/android/screen_capture_factory_android.h"
+#endif
#if defined(USE_AURA)
#include "content/browser/media/capture/desktop_capture_device_aura.h"
#endif
@@ -417,7 +420,12 @@ VideoCaptureManager::DoStartDeviceOnDeviceThread(
#endif
if (desktop_id.type != DesktopMediaID::TYPE_NONE &&
desktop_id.type != DesktopMediaID::TYPE_AURA_WINDOW) {
+#if defined(OS_ANDROID)
+ if (desktop_id.type == DesktopMediaID::TYPE_SCREEN)
whywhat 2015/08/17 13:58:46 nit: fix indent (add 2 spaces)? is it okay to leav
+ video_capture_device = media::ScreenCaptureFactoryAndroid::Create();
+#else
video_capture_device = DesktopCaptureDevice::Create(desktop_id);
+#endif
}
#endif // defined(ENABLE_SCREEN_CAPTURE)
break;

Powered by Google App Engine
This is Rietveld 408576698