[webkit-changes] [WebKit/WebKit] 8f3c7e: Refactor PlaybackSessionInterfaceAVKit

Dana Estra noreply at github.com
Fri Feb 2 09:08:08 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8f3c7ed80e7d7aa61480065dec88bea27bf7c997
      https://github.com/WebKit/WebKit/commit/8f3c7ed80e7d7aa61480065dec88bea27bf7c997
  Author: Dana Estra <destra at apple.com>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm
    A Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.h
    A Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.mm
    A Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.h
    A Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.mm
    M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h
    M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm
    M Source/WebCore/platform/ios/WebAVPlayerController.h
    M Source/WebCore/platform/ios/WebAVPlayerController.mm
    M Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
    M Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.mm

  Log Message:
  -----------
  Refactor PlaybackSessionInterfaceAVKit
https://bugs.webkit.org/show_bug.cgi?id=268418
rdar://121965868

Reviewed by Jer Noble.

This patch refactors PlaybackSessionInterfaceAVKit. It makes a base class, PlaybackSessionInterfaceIOS,
and two classes that are derived from it: PlaybackSessionInterfaceAVKit and PlaybackSessionInterfaceLMK.
All AVKit-specific code is in PlaybackSessionInterfaceAVKit. PlaybackSessionInterfaceLMK will be used on
the vision platform in a later patch. As for now, PlaybackSessionInterfaceAVKit is the only class that is ever
instantiated.

* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/PlatformPlaybackSessionInterface.h:
* Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h:
* Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit):
(WebCore::PlaybackSessionInterfaceAVKit::playerController const):
(WebCore::PlaybackSessionInterfaceAVKit::invalidate):
(WebCore::PlaybackSessionInterfaceAVKit::playbackSessionModel const): Deleted.
(WebCore::PlaybackSessionInterfaceAVKit::modelDestroyed): Deleted.
(WebCore::PlaybackSessionInterfaceAVKit::logIdentifier const): Deleted.
(WebCore::PlaybackSessionInterfaceAVKit::loggerPtr const): Deleted.
(WebCore::PlaybackSessionInterfaceAVKit::logChannel const): Deleted.
* Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.h: Copied from Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h.
* Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.mm: Added.
(WebCore::PlaybackSessionInterfaceIOS::PlaybackSessionInterfaceIOS):
(WebCore::PlaybackSessionInterfaceIOS::playbackSessionModel const):
(WebCore::PlaybackSessionInterfaceIOS::modelDestroyed):
(WebCore::PlaybackSessionInterfaceIOS::logIdentifier const):
(WebCore::PlaybackSessionInterfaceIOS::loggerPtr const):
(WebCore::PlaybackSessionInterfaceIOS::logChannel const):
* Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.h: Copied from Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h.
* Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.mm: Added.
(WebCore::PlaybackSessionInterfaceLMK::PlaybackSessionInterfaceLMK):
(WebCore::PlaybackSessionInterfaceLMK::~PlaybackSessionInterfaceLMK):
(WebCore::PlaybackSessionInterfaceLMK::durationChanged):
(WebCore::PlaybackSessionInterfaceLMK::currentTimeChanged):
(WebCore::PlaybackSessionInterfaceLMK::bufferedTimeChanged):
(WebCore::PlaybackSessionInterfaceLMK::rateChanged):
(WebCore::PlaybackSessionInterfaceLMK::seekableRangesChanged):
(WebCore::PlaybackSessionInterfaceLMK::canPlayFastReverseChanged):
(WebCore::PlaybackSessionInterfaceLMK::audioMediaSelectionOptionsChanged):
(WebCore::PlaybackSessionInterfaceLMK::legibleMediaSelectionOptionsChanged):
(WebCore::PlaybackSessionInterfaceLMK::externalPlaybackChanged):
(WebCore::PlaybackSessionInterfaceLMK::wirelessVideoPlaybackDisabledChanged):
(WebCore::PlaybackSessionInterfaceLMK::mutedChanged):
(WebCore::PlaybackSessionInterfaceLMK::volumeChanged):
(WebCore::PlaybackSessionInterfaceLMK::invalidate):
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h:
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm:
(VideoPresentationInterfaceIOS::create):
(VideoPresentationInterfaceIOS::VideoPresentationInterfaceIOS):
* Source/WebCore/platform/ios/WebAVPlayerController.h:
* Source/WebCore/platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController playbackSessionInterface]):
(-[WebAVPlayerController setPlaybackSessionInterface:]):
* Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:
(VideoFullscreenControllerContext::setUpFullscreen):
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionManagerProxy::createModelAndInterface):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
* Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController init]):

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




More information about the webkit-changes mailing list