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

Changeset 263878 in webkit


Ignore:
Timestamp:
Jul 2, 2020, 6:05:35 PM (6 years ago)
Author:
beidson@apple.com
Message:

GameController.framework soft linking refactoring
​https://bugs.webkit.org/show_bug.cgi?id=213909

Reviewed by Tim Horton.

No new tests (No behavior changes)

  • WebCore.xcodeproj/project.pbxproj:
  • platform/gamepad/cocoa/GameControllerGamepadProvider.mm:

(WebCore::GameControllerGamepadProvider::startMonitoringGamepads):

  • platform/gamepad/cocoa/GameControllerSPI.h: Added.
  • platform/gamepad/cocoa/GameControllerSoftLink.h: Added.
  • platform/gamepad/cocoa/GameControllerSoftLink.mm: Added.
Location:
trunk/Source/WebCore
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r263860 r263878  
     12020-07-02  Brady Eidson  <beidson@apple.com>
     2
     3        GameController.framework soft linking refactoring
     4        https://bugs.webkit.org/show_bug.cgi?id=213909
     5
     6        Reviewed by Tim Horton.
     7
     8        No new tests (No behavior changes)
     9
     10        * WebCore.xcodeproj/project.pbxproj:
     11        * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
     12        (WebCore::GameControllerGamepadProvider::startMonitoringGamepads):
     13        * platform/gamepad/cocoa/GameControllerSPI.h: Added.
     14        * platform/gamepad/cocoa/GameControllerSoftLink.h: Added.
     15        * platform/gamepad/cocoa/GameControllerSoftLink.mm: Added.
     16
    1172020-07-02  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r263788 r263878  
    14091409                512DD8FC0D91E6AF000F89EE /* ArchiveResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 512DD8F20D91E6AF000F89EE /* ArchiveResource.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14101410                512DD8FD0D91E6AF000F89EE /* ArchiveFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 512DD8F30D91E6AF000F89EE /* ArchiveFactory.h */; };
     1411                5130F2F624AEA60A00E1D0A0 /* GameControllerSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5130F2F424AEA60300E1D0A0 /* GameControllerSoftLink.mm */; };
    14111412                51327D6011A33A2B004F9D65 /* SinkDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 51327D5E11A33A2B004F9D65 /* SinkDocument.h */; };
    14121413                513F14540AB634C400094DDF /* IconLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 513F14520AB634C400094DDF /* IconLoader.h */; };
    … …  
    82248225                512DD8F30D91E6AF000F89EE /* ArchiveFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveFactory.h; sourceTree = "<group>"; };
    82258226                512F1A771C07EA0D00908239 /* IDBGetResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBGetResult.cpp; sourceTree = "<group>"; };
     8227                5130F2F224AEA60200E1D0A0 /* GameControllerSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameControllerSoftLink.h; sourceTree = "<group>"; };
     8228                5130F2F424AEA60300E1D0A0 /* GameControllerSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GameControllerSoftLink.mm; sourceTree = "<group>"; };
     8229                5130F2F524AEA60300E1D0A0 /* GameControllerSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameControllerSPI.h; sourceTree = "<group>"; };
    82268230                51327D5E11A33A2B004F9D65 /* SinkDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SinkDocument.h; sourceTree = "<group>"; };
    82278231                51327D5F11A33A2B004F9D65 /* SinkDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SinkDocument.cpp; sourceTree = "<group>"; };
    … …  
    1971219716                                51E398FE1D6E474B009C8831 /* GameControllerGamepadProvider.h */,
    1971319717                                51E398FF1D6E474B009C8831 /* GameControllerGamepadProvider.mm */,
     19718                                5130F2F224AEA60200E1D0A0 /* GameControllerSoftLink.h */,
     19719                                5130F2F424AEA60300E1D0A0 /* GameControllerSoftLink.mm */,
     19720                                5130F2F524AEA60300E1D0A0 /* GameControllerSPI.h */,
    1971419721                        );
    1971519722                        path = cocoa;
    … …  
    3491634923                                DE5F84331FA186E9006DB63A /* UnifiedSource330.cpp in Sources */,
    3491734924                                DE5F84341FA186E9006DB63A /* UnifiedSource331.cpp in Sources */,
     34925                                5130F2F624AEA60A00E1D0A0 /* GameControllerSoftLink.mm in Sources */,
    3491834926                                DE5F84351FA186E9006DB63A /* UnifiedSource332.cpp in Sources */,
    3491934927                                DE5F84361FA186E9006DB63A /* UnifiedSource333.cpp in Sources */,
  • trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm

    r248846 r263878  
    3030
    3131#import "GameControllerGamepad.h"
     32#import "GameControllerSoftLink.h"
    3233#import "GamepadProviderClient.h"
    3334#import "Logging.h"
    3435#import <GameController/GameController.h>
    3536#import <wtf/NeverDestroyed.h>
    36 #import <wtf/SoftLinking.h>
    37 
    38 SOFT_LINK_FRAMEWORK_OPTIONAL(GameController)
    39 SOFT_LINK_CLASS_OPTIONAL(GameController, GCController);
    40 SOFT_LINK_CONSTANT_MAY_FAIL(GameController, GCControllerDidConnectNotification, NSString *)
    41 SOFT_LINK_CONSTANT_MAY_FAIL(GameController, GCControllerDidDisconnectNotification, NSString *)
    4237
    4338namespace WebCore {
    … …  
    107102        return;
    108103
    109     if (canLoadGCControllerDidConnectNotification()) {
    110         m_connectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:getGCControllerDidConnectNotification() object:nil queue:nil usingBlock:^(NSNotification *notification) {
     104    if (canLoad_GameController_GCControllerDidConnectNotification()) {
     105        m_connectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:get_GameController_GCControllerDidConnectNotification() object:nil queue:nil usingBlock:^(NSNotification *notification) {
    111106            GameControllerGamepadProvider::singleton().controllerDidConnect(notification.object, ConnectionVisibility::Visible);
    112107        }];
    113108    }
    114109
    115     if (canLoadGCControllerDidDisconnectNotification()) {
    116         m_disconnectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:getGCControllerDidDisconnectNotification() object:nil queue:nil usingBlock:^(NSNotification *notification) {
     110    if (canLoad_GameController_GCControllerDidDisconnectNotification()) {
     111        m_disconnectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:get_GameController_GCControllerDidDisconnectNotification() object:nil queue:nil usingBlock:^(NSNotification *notification) {
    117112            GameControllerGamepadProvider::singleton().controllerDidDisconnect(notification.object);
    118113        }];
Note: See TracChangeset for help on using the changeset viewer.