Disable kDesktopCaptureMacV2

https://chromium-review.googlesource.com/c/chromium/src/+/3069272
This commit is contained in:
deepak1556
2021-08-19 16:06:42 -07:00
parent c49b5a9277
commit 205e477037

View File

@@ -234,11 +234,6 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
[self setFrame:[[self superview] bounds]];
}
// Refs https://github.com/electron/electron/pull/30507
// TODO(deepak1556): Enable this flag to match upstream
const base::Feature kWindowCaptureMacV2{"WindowCaptureMacV2",
base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace
NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
@@ -1240,11 +1235,13 @@ content::DesktopMediaID NativeWindowMac::GetDesktopMediaID() const {
content::DesktopMediaID::TYPE_WINDOW, GetAcceleratedWidget());
// c.f.
// https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/media/webrtc/native_desktop_media_list.cc;l=372?q=kWindowCaptureMacV2&ss=chromium
if (base::FeatureList::IsEnabled(kWindowCaptureMacV2)) {
// Refs https://github.com/electron/electron/pull/30507
// TODO(deepak1556): Match upstream for `kWindowCaptureMacV2`
#if 0
if (remote_cocoa::ScopedCGWindowID::Get(desktop_media_id.id)) {
desktop_media_id.window_id = desktop_media_id.id;
}
}
#endif
return desktop_media_id;
}