[webkit-changes] [WebKit/WebKit] 67862e: Refactor VideoPresentationInterfaceIOS

Dana Estra noreply at github.com
Wed Feb 14 07:21:20 PST 2024


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

  Changed paths:
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/platform/graphics/PlatformVideoPresentationInterface.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.mm
    R Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.h
    R Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.mm
    A Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.h
    A Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.mm
    M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h
    M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm
    M Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
    A Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.h
    A Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.mm
    A Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h
    A Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm
    M Source/WebKit/SourcesCocoa.txt
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  -----------
  Refactor VideoPresentationInterfaceIOS
https://bugs.webkit.org/show_bug.cgi?id=269231
rdar://122826677

Reviewed by Andy Estes.

This patch extracts the AVKit-specific code from VideoPresentationInterfaceIOS
and places it into a subclass called VideoPresentationInterfaceAVKit. There
is also now a second subclass called VideoPresentationInterfaceLMK, which
will be used on the vision platform in the future. For now, all IOS platforms
instantiate VideoPresentationInterfaceAVKit.

* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.mm: Removed.
* Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.h:
(WebCore::VideoPresentationInterfaceAVKit::playerLayerView const): Deleted.
(WebCore::VideoPresentationInterfaceAVKit::changingStandbyOnly): Deleted.
(): Deleted.
* Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.mm:
(-[WebAVPlayerViewControllerDelegate fullscreenInterface]):
(-[WebAVPlayerViewControllerDelegate setFullscreenInterface:]):
(convertToExitFullScreenReason):
(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(-[WebAVPlayerViewController configurePlayerViewControllerWithFullscreenInterface:]):
(-[WebAVPlayerViewController logChannel]):
(WebCore::VideoPresentationInterfaceAVKit::create):
(WebCore::VideoPresentationInterfaceAVKit::VideoPresentationInterfaceAVKit):
(WebCore::VideoPresentationInterfaceAVKit::~VideoPresentationInterfaceAVKit):
(WebCore::VideoPresentationInterfaceAVKit::playerViewController const):
(WebCore::VideoPresentationInterfaceAVKit::avPlayerViewController const):
(WebCore::VideoPresentationInterfaceAVKit::setupFullscreen):
(WebCore::VideoPresentationInterfaceAVKit::updateRouteSharingPolicy):
(WebCore::VideoPresentationInterfaceAVKit::setPlayerIdentifier):
(WebCore::VideoPresentationInterfaceAVKit::setupPlayerViewController):
(WebCore::VideoPresentationInterfaceAVKit::invalidatePlayerViewController):
(WebCore::VideoPresentationInterfaceAVKit::presentFullscreen):
(WebCore::VideoPresentationInterfaceAVKit::dismissFullscreen):
(WebCore::VideoPresentationInterfaceAVKit::tryToStartPictureInPicture):
(WebCore::VideoPresentationInterfaceAVKit::stopPictureInPicture):
(WebCore::VideoPresentationInterfaceAVKit::isPlayingVideoInEnhancedFullscreen const):
(WebCore::VideoPresentationInterfaceAVKit::setAllowsPictureInPicturePlayback):
(WebCore::VideoPresentationInterfaceAVKit::setShowsPlaybackControls):
(WebCore::VideoPresentationInterfaceAVKit::setContentDimensions):
(WebCore::setSupportsPictureInPicture):
(WebCore::supportsPictureInPicture):
(clearUIColor): Deleted.
(boolString): Deleted.
(VideoPresentationInterfaceAVKit::create): Deleted.
(VideoPresentationInterfaceAVKit::VideoPresentationInterfaceAVKit): Deleted.
(VideoPresentationInterfaceAVKit::~VideoPresentationInterfaceAVKit): Deleted.
(VideoPresentationInterfaceAVKit::avPlayerViewController const): Deleted.
(VideoPresentationInterfaceAVKit::videoDimensionsChanged): Deleted.
(VideoPresentationInterfaceAVKit::setupFullscreen): Deleted.
(VideoPresentationInterfaceAVKit::setVideoPresentationModel): Deleted.
(VideoPresentationInterfaceAVKit::hasVideoChanged): Deleted.
(VideoPresentationInterfaceAVKit::externalPlaybackChanged): Deleted.
(VideoPresentationInterfaceAVKit::pictureInPictureWasStartedWhenEnteringBackground const): Deleted.
(VideoPresentationInterfaceAVKit::exitFullscreen): Deleted.
(VideoPresentationInterfaceAVKit::cleanupFullscreen): Deleted.
(VideoPresentationInterfaceAVKit::setPlayerIdentifier): Deleted.
(VideoPresentationInterfaceAVKit::requestHideAndExitFullscreen): Deleted.
(VideoPresentationInterfaceAVKit::preparedToReturnToInline): Deleted.
(VideoPresentationInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture const): Deleted.
(VideoPresentationInterfaceAVKit::willStartPictureInPicture): Deleted.
(VideoPresentationInterfaceAVKit::didStartPictureInPicture): Deleted.
(VideoPresentationInterfaceAVKit::failedToStartPictureInPicture): Deleted.
(VideoPresentationInterfaceAVKit::didStopPictureInPicture): Deleted.
(VideoPresentationInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler): Deleted.
(VideoPresentationInterfaceAVKit::shouldExitFullscreenWithReason): Deleted.
(VideoPresentationInterfaceAVKit::setInlineRect): Deleted.
(VideoPresentationInterfaceAVKit::doSetup): Deleted.
(VideoPresentationInterfaceAVKit::doEnterFullscreen): Deleted.
(VideoPresentationInterfaceAVKit::doExitFullscreen): Deleted.
(VideoPresentationInterfaceAVKit::exitFullscreenHandler): Deleted.
(VideoPresentationInterfaceAVKit::enterFullscreenHandler): Deleted.
(VideoPresentationInterfaceAVKit::watchdogTimerFired): Deleted.
(VideoPresentationInterfaceAVKit::isPlayingVideoInEnhancedFullscreen const): Deleted.
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h:
(WebCore::VideoPresentationInterfaceIOS::playerLayerView const):
(WebCore::VideoPresentationInterfaceIOS::changingStandbyOnly):
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm:
(WebCore::clearUIColor):
(WebCore::boolString):
(WebCore::fallbackViewController):
(WebCore::VideoPresentationInterfaceIOS::presentingViewController):
(WebCore::VideoPresentationInterfaceIOS::VideoPresentationInterfaceIOS):
(WebCore::VideoPresentationInterfaceIOS::setVideoPresentationModel):
(WebCore::VideoPresentationInterfaceIOS::setupFullscreen):
(WebCore::VideoPresentationInterfaceIOS::setPlayerIdentifier):
(WebCore::VideoPresentationInterfaceIOS::requestHideAndExitFullscreen):
(WebCore::VideoPresentationInterfaceIOS::preparedToReturnToInline):
(WebCore::VideoPresentationInterfaceIOS::doSetup):
(WebCore::VideoPresentationInterfaceIOS::videoDimensionsChanged):
(WebCore::VideoPresentationInterfaceIOS::externalPlaybackChanged):
(WebCore::VideoPresentationInterfaceIOS::setInlineRect):
(WebCore::VideoPresentationInterfaceIOS::enterFullscreen):
(WebCore::VideoPresentationInterfaceIOS::doEnterFullscreen):
(WebCore::VideoPresentationInterfaceIOS::enterFullscreenHandler):
(WebCore::VideoPresentationInterfaceIOS::exitFullscreen):
(WebCore::VideoPresentationInterfaceIOS::doExitFullscreen):
(WebCore::VideoPresentationInterfaceIOS::exitFullscreenHandler):
(WebCore::VideoPresentationInterfaceIOS::cleanupFullscreen):
(WebCore::VideoPresentationInterfaceIOS::willStartPictureInPicture):
(WebCore::VideoPresentationInterfaceIOS::didStartPictureInPicture):
(WebCore::VideoPresentationInterfaceIOS::failedToStartPictureInPicture):
(WebCore::VideoPresentationInterfaceIOS::didStopPictureInPicture):
(WebCore::VideoPresentationInterfaceIOS::prepareForPictureInPictureStopWithCompletionHandler):
(WebCore::VideoPresentationInterfaceIOS::shouldExitFullscreenWithReason):
(WebCore::VideoPresentationInterfaceIOS::watchdogTimerFired):
(fallbackViewController): Deleted.
(VideoPresentationInterfaceIOS::presentingViewController): Deleted.
(VideoPresentationInterfaceIOS::VideoPresentationInterfaceIOS): Deleted.
(VideoPresentationInterfaceIOS::~VideoPresentationInterfaceIOS): Deleted.
(VideoPresentationInterfaceIOS::playerController const): Deleted.
(VideoPresentationInterfaceIOS::applicationDidBecomeActive): Deleted.
(VideoPresentationInterfaceIOS::enterFullscreen): Deleted.
(VideoPresentationInterfaceIOS::exitFullscreenWithoutAnimationToMode): Deleted.
(VideoPresentationInterfaceIOS::invalidate): Deleted.
(VideoPresentationInterfaceIOS::preparedToExitFullscreen): Deleted.
(VideoPresentationInterfaceIOS::prepareForPictureInPictureStop): Deleted.
(VideoPresentationInterfaceIOS::willStopPictureInPicture): Deleted.
(VideoPresentationInterfaceIOS::setHasVideoContentLayer): Deleted.
(VideoPresentationInterfaceIOS::preparedToReturnToStandby): Deleted.
(VideoPresentationInterfaceIOS::finalizeSetup): Deleted.
(VideoPresentationInterfaceIOS::returnToStandby): Deleted.
(VideoPresentationInterfaceIOS::setMode): Deleted.
(VideoPresentationInterfaceIOS::clearMode): Deleted.
(VideoPresentationInterfaceIOS::logIdentifier const): Deleted.
(VideoPresentationInterfaceIOS::loggerPtr const): Deleted.
(VideoPresentationInterfaceIOS::logChannel const): Deleted.
* Source/WebCore/platform/ios/VideoPresentationInterfaceLMK.h: Removed.
* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.h: Renamed from Source/WebCore/platform/ios/PlaybackSessionInterfaceLMK.h.
* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.mm: Added.
(-[WKLinearMediaPlayerDelegate initWithInterface:]):
(WebKit::PlaybackSessionInterfaceLMK::create):
(WebKit::PlaybackSessionInterfaceLMK::PlaybackSessionInterfaceLMK):
(WebKit::PlaybackSessionInterfaceLMK::~PlaybackSessionInterfaceLMK):
(WebKit::PlaybackSessionInterfaceLMK::invalidate):
(WebKit::PlaybackSessionInterfaceLMK::playerController const):
(WebKit::PlaybackSessionInterfaceLMK::durationChanged):
(WebKit::PlaybackSessionInterfaceLMK::currentTimeChanged):
(WebKit::PlaybackSessionInterfaceLMK::bufferedTimeChanged):
(WebKit::PlaybackSessionInterfaceLMK::rateChanged):
(WebKit::PlaybackSessionInterfaceLMK::seekableRangesChanged):
(WebKit::PlaybackSessionInterfaceLMK::canPlayFastReverseChanged):
(WebKit::PlaybackSessionInterfaceLMK::audioMediaSelectionOptionsChanged):
(WebKit::PlaybackSessionInterfaceLMK::legibleMediaSelectionOptionsChanged):
(WebKit::PlaybackSessionInterfaceLMK::externalPlaybackChanged):
(WebKit::PlaybackSessionInterfaceLMK::wirelessVideoPlaybackDisabledChanged):
(WebKit::PlaybackSessionInterfaceLMK::mutedChanged):
(WebKit::PlaybackSessionInterfaceLMK::volumeChanged):
(WebKit::PlaybackSessionInterfaceLMK::logClassName const):
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h: Added.
(WebKit::VideoPresentationInterfaceLMK::logClassName const):
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm: Renamed from Source/WebCore/platform/ios/VideoPresentationInterfaceLMK.mm.
(-[WKPlayableViewControllerDelegate initWithInterface:]):
(WebKit::VideoPresentationInterfaceLMK::~VideoPresentationInterfaceLMK):
(WebKit::VideoPresentationInterfaceLMK::create):
(WebKit::VideoPresentationInterfaceLMK::VideoPresentationInterfaceLMK):
(WebKit::VideoPresentationInterfaceLMK::linearMediaPlayer const):
(WebKit::VideoPresentationInterfaceLMK::setupFullscreen):
(WebKit::VideoPresentationInterfaceLMK::pictureInPictureWasStartedWhenEnteringBackground const):
(WebKit::VideoPresentationInterfaceLMK::hasVideoChanged):
(WebKit::VideoPresentationInterfaceLMK::setPlayerIdentifier):
(WebKit::VideoPresentationInterfaceLMK::mayAutomaticallyShowVideoPictureInPicture const):
(WebKit::VideoPresentationInterfaceLMK::setupPlayerViewController):
(WebKit::VideoPresentationInterfaceLMK::invalidatePlayerViewController):
(WebKit::VideoPresentationInterfaceLMK::presentFullscreen):
(WebKit::VideoPresentationInterfaceLMK::dismissFullscreen):
(WebKit::VideoPresentationInterfaceLMK::isPlayingVideoInEnhancedFullscreen const):
(WebKit::VideoPresentationInterfaceLMK::avPlayerViewController const):
(WebKit::VideoPresentationInterfaceLMK::playerViewController const):
(WebKit::VideoPresentationInterfaceLMK::setContentDimensions):
(WebKit::VideoPresentationInterfaceLMK::setShowsPlaybackControls):
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

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




More information about the webkit-changes mailing list