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

Unified Diff: chrome/browser/media/media_capture_devices_dispatcher.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: chrome/browser/media/media_capture_devices_dispatcher.cc
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc
index 79c93f5c1124def7b7aa119c90259682a0ae0532..bd7f12e38c22ffa310a2ef16a1f8e5352e4649d3 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -584,6 +584,12 @@ void MediaCaptureDevicesDispatcher::ProcessScreenCaptureAccessRequest(
user_approved = (result == chrome::MESSAGE_BOX_RESULT_YES);
}
+#if defined(OS_ANDROID)
+ // For android, MediaProjectionManager API will start an activity to
+ // prompt the user whether to allow screen capture. So here user_approved
+ // is useless.
+ user_approved = true;
+#endif
if (user_approved || component_extension || whitelisted_extension) {
content::DesktopMediaID screen_id;
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698