[webkit-changes] [WebKit/WebKit] 3ae709: [Cocoa] Allow user agent to show prompt before sys...

Eric Carlson noreply at github.com
Wed May 24 18:19:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3ae70929d72c5e23384953be98c9d48829c2ae0b
      https://github.com/WebKit/WebKit/commit/3ae70929d72c5e23384953be98c9d48829c2ae0b
  Author: Eric Carlson <eric.carlson at apple.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/PAL/pal/mac/ScreenCaptureKitSoftLink.h
    M Source/WebCore/PAL/pal/mac/ScreenCaptureKitSoftLink.mm
    M Source/WebCore/PAL/pal/spi/mac/ScreenCaptureKitSPI.h
    M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm
    M Source/WebKit/UIProcess/mac/UserMediaPermissionRequestProxyMac.mm

  Log Message:
  -----------
  [Cocoa] Allow user agent to show prompt before system window/screen picker
https://bugs.webkit.org/show_bug.cgi?id=257278
rdar://109793933

Reviewed by Jer Noble.

Add a setting to allow the user agent to show a prompt before the system
window/screen picker

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Add RequireUAGetDisplayMediaPrompt.

* Source/WebCore/PAL/pal/mac/ScreenCaptureKitSoftLink.h: Declare SCContentSharingPickerConfiguration.
* Source/WebCore/PAL/pal/mac/ScreenCaptureKitSoftLink.mm: Soft link it.

* Source/WebCore/PAL/pal/spi/mac/ScreenCaptureKitSPI.h: Add additional SPI.

* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm:
(WebCore::ScreenCaptureKitSharingSessionManager::isAvailable): Require SCContentSharingPickerConfiguration
to be available.
(WebCore::ScreenCaptureKitSharingSessionManager::promptWithSCContentSharingPicker): Allow the
system picker to be invoked in window-only, screen-only, or window and screen picking mode.

* Source/WebKit/UIProcess/mac/UserMediaPermissionRequestProxyMac.mm:
(WebKit::UserMediaPermissionRequestProxyMac::canRequestDisplayCapturePermission): Check
the requireUAGetDisplayMediaPrompt preference.

Canonical link: https://commits.webkit.org/264498@main




More information about the webkit-changes mailing list