⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276120 in webkit


Ignore:
Timestamp:
Apr 15, 2021, 11:49:28 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, reverting r276107.
https://bugs.webkit.org/show_bug.cgi?id=224653

It broke non-Cocoa clean builds

Reverted changeset:

"[GPUP] WebContent process should not create AVOutputContext
instances when media in GPU Process is enabled"
https://bugs.webkit.org/show_bug.cgi?id=224469
https://trac.webkit.org/changeset/276107

Location:
trunk/Source
Files:
1 added
2 deleted
41 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r276119 r276120  
     12021-04-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r276107.
     4        https://bugs.webkit.org/show_bug.cgi?id=224653
     5
     6        It broke non-Cocoa clean builds
     7
     8        Reverted changeset:
     9
     10        "[GPUP] WebContent process should not create AVOutputContext
     11        instances when media in GPU Process is enabled"
     12        https://bugs.webkit.org/show_bug.cgi?id=224469
     13        https://trac.webkit.org/changeset/276107
     14
    1152021-04-15  Lauro Moura  <lmoura@igalia.com>
    216
  • trunk/Source/WebCore/Headers.cmake

    r276107 r276120  
    12701270    platform/graphics/MediaPlaybackTarget.h
    12711271    platform/graphics/MediaPlaybackTargetClient.h
     1272    platform/graphics/MediaPlaybackTargetContext.h
    12721273    platform/graphics/MediaPlaybackTargetPicker.h
    12731274    platform/graphics/MediaPlayer.h
  • trunk/Source/WebCore/Modules/airplay/WebMediaSessionManager.cpp

    r276107 r276120  
    162162}
    163163
    164 void WebMediaSessionManager::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::MockState state)
     164void WebMediaSessionManager::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::State state)
    165165{
    166166    ALWAYS_LOG_MEDIASESSIONMANAGER(__func__);
  • trunk/Source/WebCore/Modules/airplay/WebMediaSessionManager.h

    r276107 r276120  
    5252
    5353    WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerEnabled(bool);
    54     WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::MockState);
     54    WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::State);
    5555    WEBCORE_EXPORT void mockMediaPlaybackTargetPickerDismissPopup();
    5656
  • trunk/Source/WebCore/SourcesCocoa.txt

    r276115 r276120  
    370370platform/graphics/cocoa/IntRectCocoa.mm
    371371platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp
    372 platform/graphics/cocoa/MediaPlaybackTargetContext.mm
    373372platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm
    374373platform/graphics/cocoa/SourceBufferParser.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r276115 r276120  
    69816981                1D0026A82374F9D900CA6CDF /* JSEnterPictureInPictureEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEnterPictureInPictureEvent.h; sourceTree = "<group>"; };
    69826982                1D0026A92374F9D900CA6CDF /* JSEnterPictureInPictureEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEnterPictureInPictureEvent.cpp; sourceTree = "<group>"; };
    6983                 1D008AA5262108C000EE3ADE /* MediaPlaybackTargetContext.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaPlaybackTargetContext.mm; sourceTree = "<group>"; };
    69846983                1D2C82B6236A3F6A0055D6C5 /* PictureInPictureSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PictureInPictureSupport.h; sourceTree = "<group>"; };
    69856984                1D47658D25CCA778007AF312 /* ImageDecoderIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageDecoderIdentifier.h; sourceTree = "<group>"; };
     
    2696826967                                07E3DFD01A9E786500764CA8 /* MediaPlaybackTarget.h */,
    2696926968                                079216531AA560AA00A3C049 /* MediaPlaybackTargetClient.h */,
     26969                                07F876831AD4A94500905849 /* MediaPlaybackTargetContext.h */,
    2697026970                                078E43D71ABB6C7E001C2FA6 /* MediaPlaybackTargetPicker.cpp */,
    2697126971                                078E43D81ABB6C7E001C2FA6 /* MediaPlaybackTargetPicker.h */,
     
    2718327183                                CDC48AC82149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.cpp */,
    2718427184                                CDC48AC72149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h */,
    27185                                 07F876831AD4A94500905849 /* MediaPlaybackTargetContext.h */,
    27186                                 1D008AA5262108C000EE3ADE /* MediaPlaybackTargetContext.mm */,
    2718727185                                31647FA8251616BD0010F8FB /* OpenGLSoftLinkCocoa.h */,
    2718827186                                31647FA9251616BD0010F8FB /* OpenGLSoftLinkCocoa.mm */,
     
    3211832116                                41A3D58F101C152D00316D07 /* DedicatedWorkerThread.h in Headers */,
    3211932117                                FD06DFA6134A4DEF006F5D7D /* DefaultAudioDestinationNode.h in Headers */,
    32120                                 E4F38D1B2626F13B007B1064 /* DefaultResourceLoadPriority.h in Headers */,
    3212132118                                CD83D36221122A210076E11C /* DeferrableTask.h in Headers */,
    3212232119                                FD31602C12B0267600C1A359 /* DelayDSPKernel.h in Headers */,
     
    3461834615                                BCEA487A097D93020094C9E4 /* RenderLayer.h in Headers */,
    3461934616                                0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */,
     34617                                E4F38D1B2626F13B007B1064 /* DefaultResourceLoadPriority.h in Headers */,
    3462034618                                0F580CFD0F12DE9B0051D689 /* RenderLayerCompositor.h in Headers */,
    3462134619                                3C244FEAA375AC633F88BE6F /* RenderLayerModelObject.h in Headers */,
  • trunk/Source/WebCore/page/ChromeClient.h

    r276107 r276120  
    514514    virtual void playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier, MediaProducer::MediaStateFlags) { }
    515515    virtual void setMockMediaPlaybackTargetPickerEnabled(bool)  { }
    516     virtual void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::MockState) { }
     516    virtual void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::State) { }
    517517    virtual void mockMediaPlaybackTargetPickerDismissPopup() { }
    518518#endif
  • trunk/Source/WebCore/page/Page.cpp

    r276107 r276120  
    29532953}
    29542954
    2955 void Page::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::MockState state)
     2955void Page::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::State state)
    29562956{
    29572957    chrome().client().setMockMediaPlaybackTargetPickerState(name, state);
  • trunk/Source/WebCore/page/Page.h

    r276107 r276120  
    732732    void playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier, MediaProducer::MediaStateFlags);
    733733    WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerEnabled(bool);
    734     WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::MockState);
     734    WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::State);
    735735    WEBCORE_EXPORT void mockMediaPlaybackTargetPickerDismissPopup();
    736736
  • trunk/Source/WebCore/platform/graphics/MediaPlaybackTarget.h

    r276107 r276120  
    2828#if ENABLE(WIRELESS_PLAYBACK_TARGET)
    2929
    30 #include "MediaPlaybackTargetContext.h"
    3130#include <wtf/Forward.h>
    3231#include <wtf/RefCounted.h>
     
    3433namespace WebCore {
    3534
     35class MediaPlaybackTargetContext;
     36
    3637class MediaPlaybackTarget : public RefCounted<MediaPlaybackTarget> {
    3738public:
    3839    virtual ~MediaPlaybackTarget() = default;
    3940
    40     enum class TargetType : uint8_t { AVFoundation, Mock };
     41    enum TargetType { AVFoundation, Mock };
    4142    virtual TargetType targetType() const = 0;
     43
    4244    virtual const MediaPlaybackTargetContext& targetContext() const = 0;
    43 
    44     bool hasActiveRoute() const { return targetContext().hasActiveRoute(); }
    45     String deviceName() const { return targetContext().deviceName(); }
    46     bool supportsRemoteVideoPlayback() { return targetContext().supportsRemoteVideoPlayback(); }
     45    virtual bool hasActiveRoute() const = 0;
     46    virtual String deviceName() const = 0;
     47    virtual bool supportsRemoteVideoPlayback() const = 0;
    4748};
    4849
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h

    r276107 r276120  
    2929
    3030#include "MediaPlaybackTarget.h"
     31#include "MediaPlaybackTargetContext.h"
    3132#include <wtf/RetainPtr.h>
    3233
     
    3637public:
    3738    WEBCORE_EXPORT static Ref<MediaPlaybackTarget> create(AVOutputContext *);
    38     WEBCORE_EXPORT static Ref<MediaPlaybackTarget> create(MediaPlaybackTargetContext&&);
    3939
    4040#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(MACCATALYST)
     
    4444    virtual ~MediaPlaybackTargetCocoa();
    4545
    46     TargetType targetType() const final { return TargetType::AVFoundation; }
    47     const MediaPlaybackTargetContext& targetContext() const final { return m_context; }
     46    TargetType targetType() const final { return AVFoundation; }
     47
     48    const MediaPlaybackTargetContext& targetContext() const final;
     49    bool hasActiveRoute() const final;
     50    String deviceName() const final;
     51    bool supportsRemoteVideoPlayback() const final;
     52
     53    AVOutputContext *outputContext() const { return m_outputContext.get(); }
    4854
    4955protected:
    50     explicit MediaPlaybackTargetCocoa(AVOutputContext *);
    51     explicit MediaPlaybackTargetCocoa(MediaPlaybackTargetContext&&);
     56    MediaPlaybackTargetCocoa(AVOutputContext *);
    5257
    53     MediaPlaybackTargetContext m_context;
     58    RetainPtr<AVOutputContext> m_outputContext;
     59    mutable MediaPlaybackTargetContext m_context;
     60    String m_deviceName;
    5461};
    5562
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm

    r276107 r276120  
    3535namespace WebCore {
    3636
    37 Ref<MediaPlaybackTarget> MediaPlaybackTargetCocoa::create(AVOutputContext *outputContext)
     37Ref<MediaPlaybackTarget> MediaPlaybackTargetCocoa::create(AVOutputContext *context)
    3838{
    39     return adoptRef(*new MediaPlaybackTargetCocoa(outputContext));
     39    return adoptRef(*new MediaPlaybackTargetCocoa(context));
    4040}
    4141
    42 Ref<MediaPlaybackTarget> MediaPlaybackTargetCocoa::create(MediaPlaybackTargetContext&& context)
    43 {
    44     return adoptRef(*new MediaPlaybackTargetCocoa(WTFMove(context)));
    45 }
    46 
    47 MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa(AVOutputContext *outputContext)
    48     : m_context(outputContext)
    49 {
    50 }
    51 
    52 MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa(MediaPlaybackTargetContext&& context)
    53     : m_context(WTFMove(context))
     42MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa(AVOutputContext *context)
     43    : MediaPlaybackTarget()
     44    , m_outputContext(context)
    5445{
    5546}
     
    6354#endif
    6455
     56bool MediaPlaybackTargetCocoa::supportsRemoteVideoPlayback() const
     57{
     58    if (!m_outputContext)
     59        return false;
     60
     61    if (![m_outputContext respondsToSelector:@selector(supportsMultipleOutputDevices)] || ![m_outputContext supportsMultipleOutputDevices] || ![m_outputContext respondsToSelector:@selector(outputDevices)]) {
     62        if (auto *outputDevice = [m_outputContext outputDevice]) {
     63            if (outputDevice.deviceFeatures & AVOutputDeviceFeatureVideo)
     64                return true;
     65        }
     66
     67        return false;
     68    }
     69
     70    for (AVOutputDevice *outputDevice in [m_outputContext outputDevices]) {
     71        if (outputDevice.deviceFeatures & AVOutputDeviceFeatureVideo)
     72            return true;
     73    }
     74
     75    return false;
     76}
     77
    6578MediaPlaybackTargetCocoa::~MediaPlaybackTargetCocoa()
    6679{
     80}
     81
     82const MediaPlaybackTargetContext& MediaPlaybackTargetCocoa::targetContext() const
     83{
     84    m_context = MediaPlaybackTargetContext(m_outputContext.get());
     85    return m_context;
     86}
     87
     88bool MediaPlaybackTargetCocoa::hasActiveRoute() const
     89{
     90    if (!m_outputContext)
     91        return false;
     92
     93    if ([m_outputContext respondsToSelector:@selector(supportsMultipleOutputDevices)] && [m_outputContext supportsMultipleOutputDevices] && [m_outputContext respondsToSelector:@selector(outputDevices)]) {
     94        for (AVOutputDevice *outputDevice in [m_outputContext outputDevices]) {
     95            if (outputDevice.deviceFeatures & (AVOutputDeviceFeatureVideo | AVOutputDeviceFeatureAudio))
     96                return true;
     97        }
     98
     99        return false;
     100    }
     101
     102    if ([m_outputContext respondsToSelector:@selector(outputDevice)]) {
     103        if (auto *outputDevice = [m_outputContext outputDevice])
     104            return outputDevice.deviceFeatures & (AVOutputDeviceFeatureVideo | AVOutputDeviceFeatureAudio);
     105    }
     106
     107    return m_outputContext.get().deviceName;
     108}
     109
     110String MediaPlaybackTargetCocoa::deviceName() const
     111{
     112    if (!m_outputContext)
     113        return emptyString();
     114
     115    if (![m_outputContext supportsMultipleOutputDevices])
     116        return [m_outputContext deviceName];
     117
     118    auto outputDeviceNames = adoptNS([[NSMutableArray alloc] init]);
     119    for (AVOutputDevice *outputDevice in [m_outputContext outputDevices])
     120        [outputDeviceNames addObject:[outputDevice deviceName]];
     121
     122    return [outputDeviceNames componentsJoinedByString:@" + "];
    67123}
    68124
     
    74130const MediaPlaybackTargetCocoa* toMediaPlaybackTargetCocoa(const MediaPlaybackTarget* rep)
    75131{
    76     RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(rep->targetType() == MediaPlaybackTarget::TargetType::AVFoundation);
     132    ASSERT_WITH_SECURITY_IMPLICATION(rep->targetType() == MediaPlaybackTarget::AVFoundation);
    77133    return static_cast<const MediaPlaybackTargetCocoa*>(rep);
    78134}
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r276107 r276120  
    28252825#if !PLATFORM(IOS_FAMILY)
    28262826    if (m_playbackTarget) {
    2827         if (m_playbackTarget->targetType() == MediaPlaybackTarget::TargetType::AVFoundation)
     2827        if (m_playbackTarget->targetType() == MediaPlaybackTarget::AVFoundation)
    28282828            wirelessTarget = m_avPlayer && m_avPlayer.get().externalPlaybackActive;
    28292829        else
     
    29692969    m_playbackTarget = WTFMove(target);
    29702970
    2971     m_outputContext = m_playbackTarget->targetType() == MediaPlaybackTarget::TargetType::AVFoundation ? toMediaPlaybackTargetCocoa(m_playbackTarget.get())->targetContext().outputContext() : nullptr;
     2971    m_outputContext = m_playbackTarget->targetType() == MediaPlaybackTarget::AVFoundation ? toMediaPlaybackTargetCocoa(m_playbackTarget.get())->outputContext() : nullptr;
    29722972
    29732973    INFO_LOG(LOGIDENTIFIER);
     
    29892989    INFO_LOG(LOGIDENTIFIER, shouldPlay);
    29902990
    2991     if (m_playbackTarget->targetType() == MediaPlaybackTarget::TargetType::AVFoundation) {
     2991    if (m_playbackTarget->targetType() == MediaPlaybackTarget::AVFoundation) {
    29922992        AVOutputContext *newContext = shouldPlay ? m_outputContext.get() : nil;
    29932993
     
    30063006    }
    30073007
    3008     ASSERT(m_playbackTarget->targetType() == MediaPlaybackTarget::TargetType::Mock);
     3008    ASSERT(m_playbackTarget->targetType() == MediaPlaybackTarget::Mock);
    30093009
    30103010    setDelayCallbacks(true);
  • trunk/Source/WebCore/platform/mock/MediaPlaybackTargetMock.cpp

    r276107 r276120  
    3131namespace WebCore {
    3232
    33 Ref<MediaPlaybackTarget> MediaPlaybackTargetMock::create(const String& name, MediaPlaybackTargetContext::MockState state)
     33Ref<MediaPlaybackTarget> MediaPlaybackTargetMock::create(const String& name, MediaPlaybackTargetContext::State state)
    3434{
    3535    return adoptRef(*new MediaPlaybackTargetMock(name, state));
    3636}
    3737
    38 MediaPlaybackTargetMock::MediaPlaybackTargetMock(const String& name, MediaPlaybackTargetContext::MockState state)
    39     : m_context(name, state)
     38MediaPlaybackTargetMock::MediaPlaybackTargetMock(const String& name, MediaPlaybackTargetContext::State state)
     39    : MediaPlaybackTarget()
     40    , m_name(name)
     41    , m_state(state)
    4042{
    4143}
    4244
    4345MediaPlaybackTargetMock::~MediaPlaybackTargetMock() = default;
     46
     47const MediaPlaybackTargetContext& MediaPlaybackTargetMock::targetContext() const
     48{
     49    m_context = MediaPlaybackTargetContext(m_name, m_state);
     50    return m_context;
     51}
    4452
    4553MediaPlaybackTargetMock* toMediaPlaybackTargetMock(MediaPlaybackTarget* rep)
     
    5058const MediaPlaybackTargetMock* toMediaPlaybackTargetMock(const MediaPlaybackTarget* rep)
    5159{
    52     RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(rep->targetType() == MediaPlaybackTarget::TargetType::Mock);
     60    ASSERT_WITH_SECURITY_IMPLICATION(rep->targetType() == MediaPlaybackTarget::Mock);
    5361    return static_cast<const MediaPlaybackTargetMock*>(rep);
    5462}
  • trunk/Source/WebCore/platform/mock/MediaPlaybackTargetMock.h

    r276107 r276120  
    2424 */
    2525
    26 #pragma once
     26#ifndef MediaPlaybackTargetMock_h
     27#define MediaPlaybackTargetMock_h
    2728
    2829#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
    2930
    3031#include "MediaPlaybackTarget.h"
     32#include "MediaPlaybackTargetContext.h"
    3133#include <wtf/text/WTFString.h>
    3234
     
    3537class MediaPlaybackTargetMock : public MediaPlaybackTarget {
    3638public:
    37     WEBCORE_EXPORT static Ref<MediaPlaybackTarget> create(const String&, MediaPlaybackTargetContext::MockState);
     39    WEBCORE_EXPORT static Ref<MediaPlaybackTarget> create(const String&, MediaPlaybackTargetContext::State);
    3840
    3941    virtual ~MediaPlaybackTargetMock();
    4042
    41     TargetType targetType() const final { return MediaPlaybackTarget::TargetType::Mock; }
    42     const MediaPlaybackTargetContext& targetContext() const final { return m_context; }
     43    TargetType targetType() const final { return Mock; }
    4344
    44     MediaPlaybackTargetContext::MockState state() const { return m_context.mockState(); }
     45    const MediaPlaybackTargetContext& targetContext() const final;
     46
     47    bool hasActiveRoute() const final { return !m_name.isEmpty(); }
     48    bool supportsRemoteVideoPlayback() const final { return !m_name.isEmpty(); }
     49
     50    String deviceName() const final { return m_name; }
     51
     52    MediaPlaybackTargetContext::State state() const;
    4553
    4654protected:
    47     MediaPlaybackTargetMock(const String&, MediaPlaybackTargetContext::MockState);
     55    MediaPlaybackTargetMock(const String&, MediaPlaybackTargetContext::State);
    4856
    49     MediaPlaybackTargetContext m_context;
     57    String m_name;
     58    MediaPlaybackTargetContext::State m_state { MediaPlaybackTargetContext::Unknown };
     59    mutable MediaPlaybackTargetContext m_context;
    5060};
    5161
     
    5666
    5767#endif // ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
     68
     69#endif
  • trunk/Source/WebCore/platform/mock/MediaPlaybackTargetPickerMock.cpp

    r276107 r276120  
    5353{
    5454    LOG(Media, "MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable");
    55     return m_state == MediaPlaybackTargetContext::MockState::OutputDeviceAvailable;
     55    return m_state == MediaPlaybackTargetContext::OutputDeviceAvailable;
    5656}
    5757
     
    8686
    8787    m_taskQueue.enqueueTask([this] {
    88         if (m_state == MediaPlaybackTargetContext::MockState::OutputDeviceAvailable)
     88        if (m_state == MediaPlaybackTargetContext::OutputDeviceAvailable)
    8989            availableDevicesDidChange();
    9090
    91         if (!m_deviceName.isEmpty() && m_state != MediaPlaybackTargetContext::MockState::Unknown)
     91        if (!m_deviceName.isEmpty() && m_state != MediaPlaybackTargetContext::Unknown)
    9292            currentDeviceDidChange();
    9393    });
     
    102102{
    103103    LOG(Media, "MediaPlaybackTargetPickerMock::invalidatePlaybackTargets");
    104     setState(emptyString(), MediaPlaybackTargetContext::MockState::Unknown);
     104    setState(emptyString(), MediaPlaybackTargetContext::Unknown);
    105105}
    106106
    107 void MediaPlaybackTargetPickerMock::setState(const String& deviceName, MediaPlaybackTargetContext::MockState state)
     107void MediaPlaybackTargetPickerMock::setState(const String& deviceName, MediaPlaybackTargetContext::State state)
    108108{
    109109    LOG(Media, "MediaPlaybackTargetPickerMock::setState - name = %s, state = 0x%x", deviceName.utf8().data(), (unsigned)state);
    110110
    111111    m_taskQueue.enqueueTask([this, state, deviceName] {
    112         if (deviceName != m_deviceName && state != MediaPlaybackTargetContext::MockState::Unknown) {
     112        if (deviceName != m_deviceName && state != MediaPlaybackTargetContext::Unknown) {
    113113            m_deviceName = deviceName;
    114114            currentDeviceDidChange();
  • trunk/Source/WebCore/platform/mock/MediaPlaybackTargetPickerMock.h

    r276107 r276120  
    4949    void invalidatePlaybackTargets() override;
    5050
    51     void setState(const String&, MediaPlaybackTargetContext::MockState);
     51    void setState(const String&, MediaPlaybackTargetContext::State);
    5252    void dismissPopup();
    5353
     
    5858    String m_deviceName;
    5959    GenericTaskQueue<Timer> m_taskQueue;
    60     MediaPlaybackTargetContext::MockState m_state { MediaPlaybackTargetContext::MockState::Unknown };
     60    MediaPlaybackTargetContext::State m_state { MediaPlaybackTargetContext::Unknown };
    6161    bool m_showingMenu { false };
    6262};
  • trunk/Source/WebCore/testing/Internals.cpp

    r276107 r276120  
    560560#if ENABLE(WIRELESS_PLAYBACK_TARGET)
    561561    page.setMockMediaPlaybackTargetPickerEnabled(true);
    562     page.setMockMediaPlaybackTargetPickerState(emptyString(), MediaPlaybackTargetContext::MockState::Unknown);
     562    page.setMockMediaPlaybackTargetPickerState(emptyString(), MediaPlaybackTargetContext::Unknown);
    563563#endif
    564564
     
    45324532    ASSERT(page);
    45334533
    4534     MediaPlaybackTargetContext::MockState state = MediaPlaybackTargetContext::MockState::Unknown;
     4534    MediaPlaybackTargetContext::State state = MediaPlaybackTargetContext::Unknown;
    45354535
    45364536    if (equalLettersIgnoringASCIICase(deviceState, "deviceavailable"))
    4537         state = MediaPlaybackTargetContext::MockState::OutputDeviceAvailable;
     4537        state = MediaPlaybackTargetContext::OutputDeviceAvailable;
    45384538    else if (equalLettersIgnoringASCIICase(deviceState, "deviceunavailable"))
    4539         state = MediaPlaybackTargetContext::MockState::OutputDeviceUnavailable;
     4539        state = MediaPlaybackTargetContext::OutputDeviceUnavailable;
    45404540    else if (equalLettersIgnoringASCIICase(deviceState, "unknown"))
    4541         state = MediaPlaybackTargetContext::MockState::Unknown;
     4541        state = MediaPlaybackTargetContext::Unknown;
    45424542    else
    45434543        return Exception { InvalidAccessError };
  • trunk/Source/WebKit/ChangeLog

    r276108 r276120  
     12021-04-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r276107.
     4        https://bugs.webkit.org/show_bug.cgi?id=224653
     5
     6        It broke non-Cocoa clean builds
     7
     8        Reverted changeset:
     9
     10        "[GPUP] WebContent process should not create AVOutputContext
     11        instances when media in GPU Process is enabled"
     12        https://bugs.webkit.org/show_bug.cgi?id=224469
     13        https://trac.webkit.org/changeset/276107
     14
    1152021-04-15  Kate Cheney  <katherine_cheney@apple.com>
    216
  • trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp

    r276107 r276120  
    6060#if ENABLE(WIRELESS_PLAYBACK_TARGET)
    6161#include <WebCore/MediaPlaybackTargetCocoa.h>
    62 #include <WebCore/MediaPlaybackTargetContext.h>
    6362#include <WebCore/MediaPlaybackTargetMock.h>
    6463#endif
     
    699698}
    700699
    701 void RemoteMediaPlayerProxy::setWirelessPlaybackTarget(MediaPlaybackTargetContext&& targetContext)
     700void RemoteMediaPlayerProxy::setWirelessPlaybackTarget(const WebCore::MediaPlaybackTargetContext& targetContext)
    702701{
    703702    switch (targetContext.type()) {
    704     case MediaPlaybackTargetContext::Type::SerializedAVOutputContext: {
    705         if (targetContext.deserializeOutputContext())
    706             m_player->setWirelessPlaybackTarget(MediaPlaybackTargetCocoa::create(WTFMove(targetContext)));
     703    case MediaPlaybackTargetContext::AVOutputContextType:
     704        m_player->setWirelessPlaybackTarget(WebCore::MediaPlaybackTargetCocoa::create(targetContext.avOutputContext()));
    707705        break;
    708     }
    709     case MediaPlaybackTargetContext::Type::Mock:
    710706#if PLATFORM(MAC)
    711         m_player->setWirelessPlaybackTarget(MediaPlaybackTargetMock::create(targetContext.deviceName(), targetContext.mockState()));
     707    case MediaPlaybackTargetContext::MockType:
     708        m_player->setWirelessPlaybackTarget(WebCore::MediaPlaybackTargetMock::create(targetContext.mockDeviceName(), targetContext.mockState()));
    712709        break;
    713 #endif
    714     case MediaPlaybackTargetContext::Type::AVOutputContext:
    715     case MediaPlaybackTargetContext::Type::None:
     710#else
     711    case MediaPlaybackTargetContext::MockType:
     712#endif
     713    case MediaPlaybackTargetContext::None:
    716714        ASSERT_NOT_REACHED();
    717715        break;
  • trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h

    r276107 r276120  
    153153    void setWirelessVideoPlaybackDisabled(bool);
    154154    void setShouldPlayToPlaybackTarget(bool);
    155     void setWirelessPlaybackTarget(WebCore::MediaPlaybackTargetContext&&);
     155    void setWirelessPlaybackTarget(const WebCore::MediaPlaybackTargetContext&);
    156156    void mediaPlayerCurrentPlaybackTargetIsWirelessChanged(bool) final;
    157157#endif
  • trunk/Source/WebKit/GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp

    r276107 r276120  
    109109void RemoteMediaSessionHelperProxy::activeVideoRouteDidChange(SupportsAirPlayVideo supportsAirPlayVideo, Ref<WebCore::MediaPlaybackTarget>&& target)
    110110{
    111     auto context = target->targetContext();
    112     if (!context.serializeOutputContext())
    113         return;
    114 
    115     m_gpuConnection.connection().send(Messages::RemoteMediaSessionHelper::ActiveVideoRouteDidChange(supportsAirPlayVideo, context), { });
     111    m_gpuConnection.connection().send(Messages::RemoteMediaSessionHelper::ActiveVideoRouteDidChange(supportsAirPlayVideo, target->targetContext()), { });
    116112}
    117113
  • trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm

    r276107 r276120  
    4242#endif
    4343
    44 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
    45 #import <WebCore/MediaPlaybackTargetContext.h>
    46 #import <objc/runtime.h>
    47 #endif
    48 
    49 #if USE(APPLE_INTERNAL_SDK)
    50 #include <WebKitAdditions/WebCoreArgumentCodersCocoaAdditions.mm>
    51 #endif
    52 
    5344#if ENABLE(APPLE_PAY)
    5445#import "DataReference.h"
     
    5748#endif
    5849
    59 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
    60 #import <pal/cocoa/AVFoundationSoftLink.h>
     50#if USE(APPLE_INTERNAL_SDK)
     51#include <WebKitAdditions/WebCoreArgumentCodersCocoaAdditions.mm>
    6152#endif
    6253
     
    616607}
    617608
    618 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
    619 void ArgumentCoder<WebCore::MediaPlaybackTargetContext>::encodePlatformData(Encoder& encoder, const MediaPlaybackTargetContext& target)
    620 {
    621     if (target.type() == MediaPlaybackTargetContext::Type::AVOutputContext) {
    622         if ([PAL::getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)])
    623             encoder << target.outputContext();
    624     } else if (target.type() == MediaPlaybackTargetContext::Type::SerializedAVOutputContext) {
    625         encoder << target.serializedOutputContext();
    626         encoder << target.hasActiveRoute();
    627     } else
    628         ASSERT_NOT_REACHED();
    629 }
    630 
    631 bool ArgumentCoder<WebCore::MediaPlaybackTargetContext>::decodePlatformData(Decoder& decoder, MediaPlaybackTargetContext::Type contextType, MediaPlaybackTargetContext& target)
    632 {
    633     ASSERT(contextType != MediaPlaybackTargetContext::Type::Mock);
    634 
    635     if (contextType == MediaPlaybackTargetContext::Type::AVOutputContext) {
    636         if (![PAL::getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)])
    637             return false;
    638 
    639         auto outputContext = IPC::decode<AVOutputContext>(decoder, PAL::getAVOutputContextClass());
    640         if (!outputContext)
    641             return false;
    642 
    643         target = WebCore::MediaPlaybackTargetContext { WTFMove(*outputContext) };
    644         return true;
    645     }
    646 
    647     if (contextType == MediaPlaybackTargetContext::Type::SerializedAVOutputContext) {
    648         RetainPtr<NSData> serializedOutputContext;
    649         if (!IPC::decode(decoder, serializedOutputContext) || !serializedOutputContext)
    650             return false;
    651 
    652         bool hasActiveRoute;
    653         if (!decoder.decode(hasActiveRoute))
    654             return false;
    655 
    656         target = WebCore::MediaPlaybackTargetContext { WTFMove(serializedOutputContext), hasActiveRoute };
    657         return true;
    658     }
    659 
    660     return false;
    661 }
    662 #endif
    663 
    664609} // namespace IPC
  • trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp

    r276107 r276120  
    24582458    encoder << hasPlatformData;
    24592459
    2460     MediaPlaybackTargetContext::Type contextType = target.type();
    2461     encoder << contextType;
     2460    int32_t targetType = target.type();
     2461    encoder << targetType;
    24622462
    24632463    if (target.encodingRequiresPlatformData()) {
     
    24662466    }
    24672467
    2468     ASSERT(contextType == MediaPlaybackTargetContext::Type::Mock);
    2469     encoder << target.deviceName();
    2470     encoder << target.mockState();
     2468    ASSERT(targetType == MediaPlaybackTargetContext::MockType);
     2469    encoder << target.mockDeviceName();
     2470    encoder << static_cast<int32_t>(target.mockState());
    24712471}
    24722472
     
    24772477        return false;
    24782478
    2479     MediaPlaybackTargetContext::Type contextType;
    2480     if (!decoder.decode(contextType))
     2479    int32_t targetType;
     2480    if (!decoder.decode(targetType))
    24812481        return false;
    24822482
    24832483    if (hasPlatformData)
    2484         return decodePlatformData(decoder, contextType, target);
    2485 
    2486     ASSERT(contextType == MediaPlaybackTargetContext::Type::Mock);
    2487     String deviceName;
    2488     if (!decoder.decode(deviceName))
    2489         return false;
    2490 
    2491     MediaPlaybackTargetContext::MockState mockState;
     2484        return decodePlatformData(decoder, target);
     2485
     2486    ASSERT(targetType == MediaPlaybackTargetContext::MockType);
     2487
     2488    String mockDeviceName;
     2489    if (!decoder.decode(mockDeviceName))
     2490        return false;
     2491
     2492    int32_t mockState;
    24922493    if (!decoder.decode(mockState))
    24932494        return false;
    24942495
    2495     target = MediaPlaybackTargetContext(deviceName, mockState);
    2496 
     2496    target = MediaPlaybackTargetContext(mockDeviceName, static_cast<MediaPlaybackTargetContext::State>(mockState));
    24972497    return true;
    24982498}
  • trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h

    r276107 r276120  
    3434#include <WebCore/IndexedDB.h>
    3535#include <WebCore/InputMode.h>
    36 #include <WebCore/MediaPlaybackTargetContext.h>
    3736#include <WebCore/MediaSelectionOption.h>
    3837#include <WebCore/NativeImage.h>
     
    197196#endif
    198197
     198#if ENABLE(WIRELESS_PLAYBACK_TARGET)
     199class MediaPlaybackTargetContext;
     200#endif
     201
    199202#if ENABLE(MEDIA_STREAM)
    200203struct MediaConstraints;
     
    642645    static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::MediaPlaybackTargetContext&);
    643646    static void encodePlatformData(Encoder&, const WebCore::MediaPlaybackTargetContext&);
    644     static WARN_UNUSED_RETURN bool decodePlatformData(Decoder&, WebCore::MediaPlaybackTargetContext::Type, WebCore::MediaPlaybackTargetContext&);
     647    static WARN_UNUSED_RETURN bool decodePlatformData(Decoder&, WebCore::MediaPlaybackTargetContext&);
    645648};
    646649#endif
  • trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm

    r276107 r276120  
    4343#import <wtf/cf/TypeCastsCF.h>
    4444
     45#if ENABLE(WIRELESS_PLAYBACK_TARGET)
     46#import <WebCore/MediaPlaybackTargetContext.h>
     47#import <objc/runtime.h>
     48#import <pal/cocoa/AVFoundationSoftLink.h>
     49#endif
     50
    4551namespace IPC {
    4652
     
    398404#endif
    399405
     406#if ENABLE(WIRELESS_PLAYBACK_TARGET)
     407
     408void ArgumentCoder<WebCore::MediaPlaybackTargetContext>::encodePlatformData(Encoder& encoder, const WebCore::MediaPlaybackTargetContext& target)
     409{
     410    if ([PAL::getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)])
     411        encoder << target.avOutputContext();
     412}
     413
     414bool ArgumentCoder<WebCore::MediaPlaybackTargetContext>::decodePlatformData(Decoder& decoder, WebCore::MediaPlaybackTargetContext& target)
     415{
     416    if (![PAL::getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)])
     417        return false;
     418
     419    auto context = IPC::decode<AVOutputContext>(decoder, PAL::getAVOutputContextClass());
     420    if (!context)
     421        return false;
     422
     423    target = WebCore::MediaPlaybackTargetContext { context->get() };
     424    return true;
     425}
     426
     427#endif
     428
    400429#if ENABLE(VIDEO)
    401430void ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::encodePlatformData(Encoder& encoder, const WebCore::SerializedPlatformDataCueValue& value)
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r276107 r276120  
    78457845    return services;
    78467846}
     7847
     7848static const Vector<ASCIILiteral>& temporaryMachServices()
     7849{
     7850    static const auto services = makeNeverDestroyed(Vector<ASCIILiteral> {
     7851        "com.apple.coremedia.routingcontext.xpc"_s // Remove after <rdar://76403302> is fixed.
     7852    });
     7853    return services;
     7854}
    78477855#endif
    78487856
     
    79407948        parameters.mediaExtensionHandles = SandboxExtension::createHandlesForMachLookup(mediaRelatedMachServices(), WTF::nullopt);
    79417949        parameters.mediaIOKitExtensionHandles = SandboxExtension::createHandlesForIOKitClassExtensions(mediaRelatedIOKitClasses(), WTF::nullopt);
     7950    } else {
     7951        // FIXME(224327): Remove this else clause once <rdar://76403302> is fixed.
     7952        parameters.mediaExtensionHandles = SandboxExtension::createHandlesForMachLookup(temporaryMachServices(), WTF::nullopt);
    79427953    }
    79437954
     
    94059416}
    94069417
    9407 void WebPageProxy::setMockMediaPlaybackTargetPickerState(const String& name, WebCore::MediaPlaybackTargetContext::MockState state)
     9418void WebPageProxy::setMockMediaPlaybackTargetPickerState(const String& name, WebCore::MediaPlaybackTargetContext::State state)
    94089419{
    94099420    pageClient().mediaSessionManager().setMockMediaPlaybackTargetPickerState(name, state);
     
    94209431        return;
    94219432
    9422     auto context = target->targetContext();
    9423     ASSERT(context.type() != MediaPlaybackTargetContext::Type::SerializedAVOutputContext);
    9424     if (preferences().useGPUProcessForMediaEnabled())
    9425         context.serializeOutputContext();
    9426 
    9427     send(Messages::WebPage::PlaybackTargetSelected(contextId, context));
     9433    send(Messages::WebPage::PlaybackTargetSelected(contextId, target->targetContext()));
    94289434}
    94299435
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r276107 r276120  
    15681568    void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags);
    15691569    void setMockMediaPlaybackTargetPickerEnabled(bool);
    1570     void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::MockState);
     1570    void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State);
    15711571    void mockMediaPlaybackTargetPickerDismissPopup();
    15721572
  • trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in

    r276107 r276120  
    477477    PlaybackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier contextId, unsigned mediaState)
    478478    SetMockMediaPlaybackTargetPickerEnabled(bool enabled)
    479     SetMockMediaPlaybackTargetPickerState(String name, enum:uint8_t WebCore::MediaPlaybackTargetContext::MockState pickerState)
     479    SetMockMediaPlaybackTargetPickerState(String name, unsigned pickerState)
    480480    MockMediaPlaybackTargetPickerDismissPopup()
    481481#endif
  • trunk/Source/WebKit/WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp

    r276107 r276120  
    8282void RemoteMediaSessionHelper::activeVideoRouteDidChange(SupportsAirPlayVideo supportsAirPlayVideo, MediaPlaybackTargetContext&& targetContext)
    8383{
    84     ASSERT(targetContext.type() != MediaPlaybackTargetContext::Type::AVOutputContext);
    85     if (targetContext.type() == MediaPlaybackTargetContext::Type::AVOutputContext)
     84    if (targetContext.type() != MediaPlaybackTargetContext::AVOutputContextType) {
     85        ASSERT_NOT_REACHED();
    8686        return;
     87    }
    8788
    88     WebCore::MediaSessionHelper::activeVideoRouteDidChange(supportsAirPlayVideo, WebCore::MediaPlaybackTargetCocoa::create(WTFMove(targetContext)));
     89    WebCore::MediaSessionHelper::activeVideoRouteDidChange(supportsAirPlayVideo, WebCore::MediaPlaybackTargetCocoa::create(targetContext.avOutputContext()));
    8990}
    9091
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r276107 r276120  
    13531353}
    13541354
    1355 void WebChromeClient::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::MockState state)
     1355void WebChromeClient::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::State state)
    13561356{
    13571357    m_page.send(Messages::WebPageProxy::SetMockMediaPlaybackTargetPickerState(name, state));
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h

    r276107 r276120  
    379379    void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags) final;
    380380    void setMockMediaPlaybackTargetPickerEnabled(bool) final;
    381     void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::MockState) final;
     381    void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State) final;
    382382    void mockMediaPlaybackTargetPickerDismissPopup() final;
    383383#endif
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r276107 r276120  
    17921792
    17931793#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
    1794     void playbackTargetSelected(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaPlaybackTargetContext&&) const;
     1794    void playbackTargetSelected(WebCore::PlaybackTargetClientContextIdentifier, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
    17951795    void playbackTargetAvailabilityDidChange(WebCore::PlaybackTargetClientContextIdentifier, bool);
    17961796    void setShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, bool);
  • trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

    r276107 r276120  
    3636#import "FrameInfoData.h"
    3737#import "InjectedBundleHitTestResult.h"
     38#import "PDFKitSoftLink.h"
    3839#import "PDFPlugin.h"
    3940#import "PageBanner.h"
     
    99100#if ENABLE(WIRELESS_PLAYBACK_TARGET)
    100101#import <WebCore/MediaPlaybackTargetCocoa.h>
    101 #import <WebCore/MediaPlaybackTargetContext.h>
    102102#import <WebCore/MediaPlaybackTargetMock.h>
    103103#endif
    104 
    105 #import "PDFKitSoftLink.h"
    106104
    107105namespace WebKit {
     
    10451043
    10461044#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
    1047 void WebPage::playbackTargetSelected(PlaybackTargetClientContextIdentifier contextId, WebCore::MediaPlaybackTargetContext&& targetContext) const
     1045void WebPage::playbackTargetSelected(PlaybackTargetClientContextIdentifier contextId, const WebCore::MediaPlaybackTargetContext& targetContext) const
    10481046{
    10491047    switch (targetContext.type()) {
    1050     case MediaPlaybackTargetContext::Type::AVOutputContext:
    1051     case MediaPlaybackTargetContext::Type::SerializedAVOutputContext:
    1052         m_page->setPlaybackTarget(contextId, MediaPlaybackTargetCocoa::create(WTFMove(targetContext)));
     1048    case MediaPlaybackTargetContext::AVOutputContextType:
     1049        m_page->setPlaybackTarget(contextId, WebCore::MediaPlaybackTargetCocoa::create(targetContext.avOutputContext()));
    10531050        break;
    1054     case MediaPlaybackTargetContext::Type::Mock:
    1055         m_page->setPlaybackTarget(contextId, MediaPlaybackTargetMock::create(targetContext.deviceName(), targetContext.mockState()));
     1051    case MediaPlaybackTargetContext::MockType:
     1052        m_page->setPlaybackTarget(contextId, WebCore::MediaPlaybackTargetMock::create(targetContext.mockDeviceName(), targetContext.mockState()));
    10561053        break;
    1057     case MediaPlaybackTargetContext::Type::None:
     1054    case MediaPlaybackTargetContext::None:
    10581055        ASSERT_NOT_REACHED();
    10591056        break;
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r276107 r276120  
     12021-04-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r276107.
     4        https://bugs.webkit.org/show_bug.cgi?id=224653
     5
     6        It broke non-Cocoa clean builds
     7
     8        Reverted changeset:
     9
     10        "[GPUP] WebContent process should not create AVOutputContext
     11        instances when media in GPU Process is enabled"
     12        https://bugs.webkit.org/show_bug.cgi?id=224469
     13        https://trac.webkit.org/changeset/276107
     14
    1152021-04-15  Peng Liu  <peng.liu6@apple.com>
    216
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h

    r276107 r276120  
    244244    void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags) final;
    245245    void setMockMediaPlaybackTargetPickerEnabled(bool) final;
    246     void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::MockState) final;
     246    void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State) final;
    247247    void mockMediaPlaybackTargetPickerDismissPopup() override;
    248248#endif
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm

    r276107 r276120  
    11301130}
    11311131
    1132 void WebChromeClient::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::MockState state)
     1132void WebChromeClient::setMockMediaPlaybackTargetPickerState(const String& name, MediaPlaybackTargetContext::State state)
    11331133{
    11341134    [m_webView _setMockMediaPlaybackTargetPickerName:name state:state];
  • trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.h

    r276107 r276120  
    5454    void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags);
    5555    void setMockMediaPlaybackTargetPickerEnabled(bool);
    56     void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::MockState);
     56    void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State);
    5757    void mockMediaPlaybackTargetPickerDismissPopup();
    5858
  • trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.mm

    r276107 r276120  
    6969}
    7070
    71 void WebMediaPlaybackTargetPicker::setMockMediaPlaybackTargetPickerState(const String& name, WebCore::MediaPlaybackTargetContext::MockState state)
     71void WebMediaPlaybackTargetPicker::setMockMediaPlaybackTargetPickerState(const String& name, WebCore::MediaPlaybackTargetContext::State state)
    7272{
    7373    WebCore::WebMediaSessionManager::shared().setMockMediaPlaybackTargetPickerState(name, state);
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r276107 r276120  
    92339233}
    92349234
    9235 - (void)_setMockMediaPlaybackTargetPickerName:(NSString *)name state:(WebCore::MediaPlaybackTargetContext::MockState)state
     9235- (void)_setMockMediaPlaybackTargetPickerName:(NSString *)name state:(WebCore::MediaPlaybackTargetContext::State)state
    92369236{
    92379237    [self _devicePicker]->setMockMediaPlaybackTargetPickerState(name, state);
  • trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h

    r276107 r276120  
    328328- (void)_playbackTargetPickerClientStateDidChange:(WebCore::PlaybackTargetClientContextIdentifier)contextId state:(WebCore::MediaProducer::MediaStateFlags)state;
    329329- (void)_setMockMediaPlaybackTargetPickerEnabled:(bool)enabled;
    330 - (void)_setMockMediaPlaybackTargetPickerName:(NSString *)name state:(WebCore::MediaPlaybackTargetContext::MockState)state;
     330- (void)_setMockMediaPlaybackTargetPickerName:(NSString *)name state:(WebCore::MediaPlaybackTargetContext::State)state;
    331331- (void)_mockMediaPlaybackTargetPickerDismissPopup;
    332332#endif
Note: See TracChangeset for help on using the changeset viewer.