f2c341b655
* chore: bump chromium in DEPS to 108.0.5339.0 * chore: bump chromium in DEPS to 108.0.5341.0 * chore: sync patch to unrelated upstream code shear patches/chromium/network_service_allow_remote_certificate_verification_logic.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3927793 * chore: sync patch to unrelated upstream code shear patches/chromium/printing.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3927793 * chore: sync patch to unrelated upstream code shear patches/chromium/chore_add_electron_deps_to_gitignores.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3906023 * chore: refresh patches - `e patches all` * chore: remove unused parameter from WillCreateURLLoaderRequestInterceptors Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3932218 * perf: avoid unique pointer round trip Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3913938 * refactor: Simplify entropy provider management. Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3901211 * fixup! perf: avoid unique pointer round trip * fixup! perf: avoid unique pointer round trip * refactor: update typeof FileSelectHelper::select_file_dialog_ Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3930092 * fixup! fixup! perf: avoid unique pointer round trip * chore: bump chromium in DEPS to 108.0.5343.0 * chore: update patches * chore: bump chromium in DEPS to 108.0.5345.0 * chore: bump chromium in DEPS to 108.0.5347.0 * chore: bump chromium in DEPS to 108.0.5349.0 * chore: bump chromium in DEPS to 108.0.5351.0 * chore: bump chromium in DEPS to 108.0.5353.0 * chore: bump chromium in DEPS to 108.0.5355.0 * chore: update patches * Refactor display::win::DisplayInfo to display::win::internal::DisplayInfo Refs https://chromium-review.googlesource.com/c/chromium/src/+/3929014 * Update proxy resolution to use NAK - Part 2 Refs https://chromium-review.googlesource.com/c/chromium/src/+/3934016 * Disable PreconnectManager when the user disabled preloading. Refs https://chromium-review.googlesource.com/c/chromium/src/+/3928470 Refs https://chromium-review.googlesource.com/c/chromium/src/+/3937183 * chore: update patches * chore: update sysroot * linux: Remove breakpad integration Refs https://chromium-review.googlesource.com/c/chromium/src/+/3764621 * chore: update comments Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
87 lines
3.4 KiB
Diff
87 lines
3.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Rose <japthorp@slack-corp.com>
|
|
Date: Tue, 12 Jul 2022 16:51:43 -0700
|
|
Subject: short-circuit permissions checks in MediaStreamDevicesController
|
|
|
|
The //components/permissions architecture is complicated and not that
|
|
widely used in Chromium, and mostly oriented around showing permissions
|
|
UI and/or remembering per-site permissions, which we're not interested
|
|
in.
|
|
|
|
Since we do a permissions check prior to invoking the
|
|
MediaStreamDevicesController, and don't (yet) provide the ability to set
|
|
granular permissions (e.g. allow video but not audio), just
|
|
short-circuit all the permissions checks in MSDC for now to allow us to
|
|
unduplicate this code.
|
|
|
|
diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc
|
|
index 7dbbcc13901dcd8b7a9ca9c9bdce4f924c1c6a55..5de44c5c20c92a1793060492f925519d6b8befe5 100644
|
|
--- a/components/webrtc/media_stream_devices_controller.cc
|
|
+++ b/components/webrtc/media_stream_devices_controller.cc
|
|
@@ -92,10 +92,13 @@ void MediaStreamDevicesController::RequestPermissions(
|
|
|
|
std::vector<blink::PermissionType> permission_types;
|
|
|
|
+#if 0
|
|
content::PermissionController* permission_controller =
|
|
web_contents->GetBrowserContext()->GetPermissionController();
|
|
+#endif
|
|
|
|
if (controller->ShouldRequestAudio()) {
|
|
+#if 0
|
|
content::PermissionResult permission_status =
|
|
permission_controller->GetPermissionResultForCurrentDocument(
|
|
blink::PermissionType::AUDIO_CAPTURE, rfh);
|
|
@@ -110,10 +113,12 @@ void MediaStreamDevicesController::RequestPermissions(
|
|
content::PermissionStatusSource::FENCED_FRAME);
|
|
return;
|
|
}
|
|
+#endif
|
|
|
|
permission_types.push_back(blink::PermissionType::AUDIO_CAPTURE);
|
|
}
|
|
if (controller->ShouldRequestVideo()) {
|
|
+#if 0
|
|
content::PermissionResult permission_status =
|
|
permission_controller->GetPermissionResultForCurrentDocument(
|
|
blink::PermissionType::VIDEO_CAPTURE, rfh);
|
|
@@ -128,6 +133,7 @@ void MediaStreamDevicesController::RequestPermissions(
|
|
content::PermissionStatusSource::FENCED_FRAME);
|
|
return;
|
|
}
|
|
+#endif
|
|
|
|
permission_types.push_back(blink::PermissionType::VIDEO_CAPTURE);
|
|
|
|
@@ -139,6 +145,7 @@ void MediaStreamDevicesController::RequestPermissions(
|
|
// pan-tilt-zoom permission and there are suitable PTZ capable devices
|
|
// available.
|
|
if (request.request_pan_tilt_zoom_permission && has_pan_tilt_zoom_camera) {
|
|
+#if 0
|
|
permission_status =
|
|
permission_controller->GetPermissionResultForCurrentDocument(
|
|
blink::PermissionType::CAMERA_PAN_TILT_ZOOM, rfh);
|
|
@@ -148,6 +155,7 @@ void MediaStreamDevicesController::RequestPermissions(
|
|
controller->RunCallback(/*blocked_by_permissions_policy=*/false);
|
|
return;
|
|
}
|
|
+#endif
|
|
|
|
permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM);
|
|
}
|
|
@@ -434,6 +442,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
|
|
return false;
|
|
}
|
|
|
|
+#if 0
|
|
// TODO(raymes): This function wouldn't be needed if
|
|
// PermissionManager::RequestPermissions returned a denial reason.
|
|
content::PermissionResult result =
|
|
@@ -444,6 +453,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
|
|
DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status);
|
|
return true;
|
|
}
|
|
+#endif
|
|
return false;
|
|
}
|
|
|