mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Upstream Chromium now owns the full SCContentSharingPicker lifecycle
via NativeScreenCapturePickerMac and the public
content::desktop_capture::OpenNativeScreenCapturePicker API, making
Electron's 392-line patch entirely redundant.
Route setDisplayMediaRequestHandler({ useSystemPicker: true }) through
the upstream API: forward the opt into ElectronBrowserContext, and when
the system picker is available on macOS 15+, call
OpenNativeScreenCapturePicker from ChooseDisplayMediaDevice and
complete the MediaResponseCallback with the upstream-issued picker id
instead of Electron's window:-4:N sentinel.
Also enable media::kUseSCContentSharingPicker on macOS 15+ via
feature_list_mac.mm so upstream constructs the picker instance.
Deletes:
- patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
- The fakeVideoWindowId / kMacOsNativePickerId / systemPickerVideoSource
sentinel in lib/browser/api/session.ts
- The _setDisplayMediaRequestHandler internal binding
Notes: Rewrote useSystemPicker to use the upstream macOS native screen-capture picker directly. Deleted ~390 lines of Electron-specific Chromium patches.