Changeset 261110 in webkit


Ignore:
Timestamp:
May 4, 2020 1:21:43 PM (4 years ago)
Author:
Darin Adler
Message:

Remove unneeded USE(MEDIAREMOTE)
https://bugs.webkit.org/show_bug.cgi?id=211385

Reviewed by Eric Carlson.

Source/WebCore:

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Remove USE(MEDIAREMOTE).

  • platform/mac/MediaRemoteSoftLink.cpp: Ditto.
  • platform/mac/MediaRemoteSoftLink.h: Ditto.
  • platform/mac/RemoteCommandListenerMac.mm:

(WebCore::RemoteCommandListenerMac::updateSupportedCommands): Ditto.
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Ditto.
(WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac): Ditto.

Source/WebCore/PAL:

  • pal/spi/mac/MediaRemoteSPI.h: Removed check of USE(MEDIAREMOTE).

Also got rid of has_include for MRNowPlayingTypes.h and moved
it down into the normal sections below.

Source/WTF:

  • wtf/PlatformUse.h: Don't set USE_MEDIAREMOTE.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Reverse conditional so it's

consistently listing which platforms we do *not* compile the test on.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r261098 r261110  
     12020-05-04  Darin Adler  <darin@apple.com>
     2
     3        Remove unneeded USE(MEDIAREMOTE)
     4        https://bugs.webkit.org/show_bug.cgi?id=211385
     5
     6        Reviewed by Eric Carlson.
     7
     8        * wtf/PlatformUse.h: Don't set USE_MEDIAREMOTE.
     9
    1102020-05-04  Darin Adler  <darin@apple.com>
    211
  • trunk/Source/WTF/wtf/PlatformUse.h

    r261097 r261110  
    271271
    272272#if PLATFORM(COCOA)
    273 #define USE_MEDIAREMOTE 1
    274273#define USE_DICTATION_ALTERNATIVES 1
    275274#endif
  • trunk/Source/WebCore/ChangeLog

    r261104 r261110  
     12020-05-04  Darin Adler  <darin@apple.com>
     2
     3        Remove unneeded USE(MEDIAREMOTE)
     4        https://bugs.webkit.org/show_bug.cgi?id=211385
     5
     6        Reviewed by Eric Carlson.
     7
     8        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
     9        (WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Remove USE(MEDIAREMOTE).
     10        * platform/mac/MediaRemoteSoftLink.cpp: Ditto.
     11        * platform/mac/MediaRemoteSoftLink.h: Ditto.
     12        * platform/mac/RemoteCommandListenerMac.mm:
     13        (WebCore::RemoteCommandListenerMac::updateSupportedCommands): Ditto.
     14        (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Ditto.
     15        (WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac): Ditto.
     16
    1172020-05-04  Devin Rousso  <drousso@apple.com>
    218
  • trunk/Source/WebCore/PAL/ChangeLog

    r261007 r261110  
     12020-05-04  Darin Adler  <darin@apple.com>
     2
     3        Remove unneeded USE(MEDIAREMOTE)
     4        https://bugs.webkit.org/show_bug.cgi?id=211385
     5
     6        Reviewed by Eric Carlson.
     7
     8        * pal/spi/mac/MediaRemoteSPI.h: Removed check of USE(MEDIAREMOTE).
     9        Also got rid of __has_include for MRNowPlayingTypes.h and moved
     10        it down into the normal sections below.
     11
    1122020-05-01  Don Olmstead  <don.olmstead@sony.com>
    213
  • trunk/Source/WebCore/PAL/pal/spi/mac/MediaRemoteSPI.h

    r235474 r261110  
    2626#pragma once
    2727
    28 #if USE(MEDIAREMOTE)
    29 
    30 #if __has_include(<MediaRemote/MRNowPlayingTypes.h>)
     28#if USE(APPLE_INTERNAL_SDK)
    3129
    3230#include <MediaRemote/MRNowPlayingTypes.h>
    33 
    34 #else
    35 
    36 enum {
    37     MRNowPlayingClientVisibilityUndefined = 0,
    38     MRNowPlayingClientVisibilityAlwaysVisible,
    39     MRNowPlayingClientVisibilityVisibleWhenBackgrounded,
    40     MRNowPlayingClientVisibilityNeverVisible
    41 };
    42 typedef uint32_t MRNowPlayingClientVisibility;
    43 
    44 #endif
    45 
    46 #if USE(APPLE_INTERNAL_SDK)
    47 
    4831#include <MediaRemote/MediaRemote.h>
    4932
     
    10184typedef uint32_t MRMediaRemoteCommandHandlerStatus;
    10285
     86enum {
     87    MRNowPlayingClientVisibilityUndefined = 0,
     88    MRNowPlayingClientVisibilityAlwaysVisible,
     89    MRNowPlayingClientVisibilityVisibleWhenBackgrounded,
     90    MRNowPlayingClientVisibilityNeverVisible
     91};
     92typedef uint32_t MRNowPlayingClientVisibility;
     93
    10394typedef uint32_t MRMediaRemoteError;
    10495typedef struct _MROrigin *MROriginRef;
     
    140131
    141132#endif // USE(APPLE_INTERNAL_SDK)
    142 
    143 #endif // USE(MEDIAREMOTE)
  • trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm

    r261004 r261110  
    313313void MediaSessionManagerCocoa::updateNowPlayingInfo()
    314314{
    315 #if USE(MEDIAREMOTE)
    316315    if (!isMediaRemoteFrameworkAvailable())
    317316        return;
     
    362361
    363362    END_BLOCK_OBJC_EXCEPTIONS
    364 #endif // USE(MEDIAREMOTE)
    365363}
    366364
  • trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp

    r237266 r261110  
    3131SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(WebCore, MediaRemote)
    3232
    33 #if USE(MEDIAREMOTE)
    34 
    3533SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteGetLocalOrigin, MROriginRef, (), ())
    3634SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteAddAsyncCommandHandlerBlock, void*, (MRMediaRemoteAsyncCommandHandlerBlock block), (block))
     
    5351SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, MediaRemote, kMRMediaRemoteNowPlayingInfoUniqueIdentifier, CFStringRef);
    5452
    55 #endif // USE(MEDIAREMOTE)
    56 
    5753#if PLATFORM(IOS_FAMILY)
    5854SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteCopyPickableRoutes, CFArrayRef, (), ());
  • trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.h

    r237266 r261110  
    3030
    3131SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, MediaRemote)
    32 
    33 #if USE(MEDIAREMOTE)
    3432
    3533SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteGetLocalOrigin, MROriginRef, (), ())
     
    7270#define kMRMediaRemoteNowPlayingInfoUniqueIdentifier get_MediaRemote_kMRMediaRemoteNowPlayingInfoUniqueIdentifier()
    7371
    74 #endif // USE(MEDIAREMOTE)
    75 
    7672#if PLATFORM(IOS_FAMILY)
    7773SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteCopyPickableRoutes, CFArrayRef, (), ())
  • trunk/Source/WebCore/platform/mac/RemoteCommandListenerMac.mm

    r260366 r261110  
    4343void RemoteCommandListenerMac::updateSupportedCommands()
    4444{
    45 #if USE(MEDIAREMOTE)
    4645    if (!isMediaRemoteFrameworkAvailable())
    4746        return;
     
    7372
    7473    MRMediaRemoteSetSupportedCommands(commandInfoArray.get(), MRMediaRemoteGetLocalOrigin(), nullptr, nullptr);
    75 #endif // USE(MEDIAREMOTE)
    7674}
    7775
     
    7977    : RemoteCommandListener(client)
    8078{
    81 #if USE(MEDIAREMOTE)
    8279    if (!isMediaRemoteFrameworkAvailable())
    8380        return;
     
    145142        completion((__bridge CFArrayRef)@[@(status)]);
    146143    });
    147 #endif // USE(MEDIAREMOTE)
    148144}
    149145
    150146RemoteCommandListenerMac::~RemoteCommandListenerMac()
    151147{
    152 #if USE(MEDIAREMOTE)
    153148    if (m_commandHandler)
    154149        MRMediaRemoteRemoveCommandHandlerBlock(m_commandHandler);
    155 #endif
    156150}
    157151
  • trunk/Tools/ChangeLog

    r261101 r261110  
     12020-05-04  Darin Adler  <darin@apple.com>
     2
     3        Remove unneeded USE(MEDIAREMOTE)
     4        https://bugs.webkit.org/show_bug.cgi?id=211385
     5
     6        Reviewed by Eric Carlson.
     7
     8        * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Reverse conditional so it's
     9        consistently listing which platforms we do *not* compile the test on.
     10
    1112020-05-04  Alex Christensen  <achristensen@webkit.org>
    212
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm

    r260366 r261110  
    2626#import "config.h"
    2727
    28 #if USE(MEDIAREMOTE) && !PLATFORM(IOS_FAMILY_SIMULATOR) && (PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304))
     28#if !PLATFORM(IOS_FAMILY_SIMULATOR) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101304)
    2929
    3030#import "PlatformUtilities.h"
     
    277277}
    278278
    279 #endif // USE(MEDIAREMOTE) && (PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304))
     279#endif
Note: See TracChangeset for help on using the changeset viewer.