Changeset 275640 in webkit


Ignore:
Timestamp:
Apr 7, 2021 3:55:54 PM (3 years ago)
Author:
commit-queue@webkit.org
Message:

[WebXR] Introduce XRDeviceIdentifier and XRDeviceInfo to be used to communicate device info
https://bugs.webkit.org/show_bug.cgi?id=224239

Patch by Ada Chan <ada.chan@apple.com> on 2021-04-07
Reviewed by Tim Horton.

These classes are codable so they can be used in messages across UI/web process boundary.
In a future patch, these classes will be used to create device objects returned from
WebChromeClient::enumerateImmersiveXRDevices().

  • Shared/Cocoa/XRDeviceIdentifier.h: Added.

This codable type will be used to identify a device.

  • Shared/Cocoa/XRDeviceInfo.h: Added.
  • Shared/Cocoa/XRDeviceInfo.mm: Added.

(WebKit::XRDeviceInfo::encode const):
(WebKit::XRDeviceInfo::decode):

  • Shared/WebCoreArgumentCoders.h:

Add EnumTraits for PlatformXR::ReferenceSpaceType so we can encode it.

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebKit
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r275634 r275640  
     12021-04-07  Ada Chan  <ada.chan@apple.com>
     2
     3        [WebXR] Introduce XRDeviceIdentifier and XRDeviceInfo to be used to communicate device info
     4        https://bugs.webkit.org/show_bug.cgi?id=224239
     5
     6        Reviewed by Tim Horton.
     7
     8        These classes are codable so they can be used in messages across UI/web process boundary.
     9        In a future patch, these classes will be used to create device objects returned from
     10        WebChromeClient::enumerateImmersiveXRDevices().
     11
     12        * Shared/Cocoa/XRDeviceIdentifier.h: Added.
     13        This codable type will be used to identify a device.
     14        * Shared/Cocoa/XRDeviceInfo.h: Added.
     15        * Shared/Cocoa/XRDeviceInfo.mm: Added.
     16        (WebKit::XRDeviceInfo::encode const):
     17        (WebKit::XRDeviceInfo::decode):
     18        * Shared/WebCoreArgumentCoders.h:
     19        Add EnumTraits for PlatformXR::ReferenceSpaceType so we can encode it.
     20        * SourcesCocoa.txt:
     21        * WebKit.xcodeproj/project.pbxproj:
     22
    1232021-04-07  Michael Catanzaro  <mcatanzaro@gnome.org>
    224
  • trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h

    r275443 r275640  
    7373#include <WebCore/GraphicsContextGLAttributes.h>
    7474#include <WebCore/GraphicsTypesGL.h>
     75#endif
     76
     77#if ENABLE(WEBXR)
     78#include <WebCore/PlatformXR.h>
    7579#endif
    7680
     
    10361040#endif
    10371041
     1042#if ENABLE(WEBXR)
     1043
     1044template<> struct EnumTraits<PlatformXR::ReferenceSpaceType> {
     1045    using values = EnumValues<
     1046        PlatformXR::ReferenceSpaceType,
     1047        PlatformXR::ReferenceSpaceType::Viewer,
     1048        PlatformXR::ReferenceSpaceType::Local,
     1049        PlatformXR::ReferenceSpaceType::LocalFloor,
     1050        PlatformXR::ReferenceSpaceType::BoundedFloor,
     1051        PlatformXR::ReferenceSpaceType::Unbounded
     1052    >;
     1053};
     1054
     1055#endif
     1056
    10381057} // namespace WTF
  • trunk/Source/WebKit/SourcesCocoa.txt

    r275484 r275640  
    181181Shared/Cocoa/WKObject.mm
    182182Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm
     183Shared/Cocoa/XRDeviceInfo.mm
    183184
    184185Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r275614 r275640  
    10971097                51FAEC3B1B0657680009C4E7 /* AuxiliaryProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FAEC361B0657310009C4E7 /* AuxiliaryProcessMessageReceiver.cpp */; };
    10981098                51FD18B61651FBAD00DBE1CE /* NetworkResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FD18B41651FBAD00DBE1CE /* NetworkResourceLoader.h */; };
     1099                525080B0261BDE6C00678AEE /* XRDeviceInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 525080AD261BDE6B00678AEE /* XRDeviceInfo.mm */; };
     1100                525080B1261BDE6C00678AEE /* XRDeviceIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 525080AE261BDE6B00678AEE /* XRDeviceIdentifier.h */; };
     1101                525080B2261BDE6C00678AEE /* XRDeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 525080AF261BDE6C00678AEE /* XRDeviceInfo.h */; };
    10991102                5272D4C91E735F0900EB4290 /* WKProtectionSpaceNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 5272D4C71E735F0900EB4290 /* WKProtectionSpaceNS.h */; settings = {ATTRIBUTES = (Private, ); }; };
    11001103                528C37C1195CBB1A00D8B9CC /* WKBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9F28101958F478008CAC72 /* WKBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    41534156                51FD18B31651FBAD00DBE1CE /* NetworkResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkResourceLoader.cpp; sourceTree = "<group>"; };
    41544157                51FD18B41651FBAD00DBE1CE /* NetworkResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkResourceLoader.h; sourceTree = "<group>"; };
     4158                525080AD261BDE6B00678AEE /* XRDeviceInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = XRDeviceInfo.mm; sourceTree = "<group>"; };
     4159                525080AE261BDE6B00678AEE /* XRDeviceIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XRDeviceIdentifier.h; sourceTree = "<group>"; };
     4160                525080AF261BDE6C00678AEE /* XRDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XRDeviceInfo.h; sourceTree = "<group>"; };
    41554161                5272D4C71E735F0900EB4290 /* WKProtectionSpaceNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKProtectionSpaceNS.h; path = mac/WKProtectionSpaceNS.h; sourceTree = "<group>"; };
    41564162                5272D4C81E735F0900EB4290 /* WKProtectionSpaceNS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKProtectionSpaceNS.mm; path = mac/WKProtectionSpaceNS.mm; sourceTree = "<group>"; };
     
    60716077                                372EBB462017E64300085064 /* com.apple.WebKit.WebContent.Development.xpc */,
    60726078                                BC3DE46615A91763008D26FC /* com.apple.WebKit.WebContent.xpc */,
     6079                                CD95493526159004008372D9 /* libWebKitSwift.dylib */,
    60736080                                A16E66002581930800EE1749 /* MediaFormatReader.bundle */,
    60746081                                1AC25FB012A48EA700BD2671 /* PluginProcessShim.dylib */,
    60756082                                8DC2EF5B0486A6940098B216 /* WebKit.framework */,
    6076                                 CD95493526159004008372D9 /* libWebKitSwift.dylib */,
    60776083                        );
    60786084                        name = Products;
     
    82418247                                C14D306824B794E700480387 /* XPCEndpointClient.h */,
    82428248                                C14D306624B794E700480387 /* XPCEndpointClient.mm */,
     8249                                525080AE261BDE6B00678AEE /* XRDeviceIdentifier.h */,
     8250                                525080AF261BDE6C00678AEE /* XRDeviceInfo.h */,
     8251                                525080AD261BDE6B00678AEE /* XRDeviceInfo.mm */,
    82438252                        );
    82448253                        name = cocoa;
     
    1295712966                                C15E6CB424B7BE7600E501A2 /* XPCEndpointClient.h in Headers */,
    1295812967                                BCBECDE816B6416800047A1A /* XPCServiceEntryPoint.h in Headers */,
     12968                                525080B1261BDE6C00678AEE /* XRDeviceIdentifier.h in Headers */,
     12969                                525080B2261BDE6C00678AEE /* XRDeviceInfo.h in Headers */,
    1295912970                        );
    1296012971                        runOnlyForDeploymentPostprocessing = 0;
     
    1442614437                                C14D306924B79BE000480387 /* XPCEndpoint.mm in Sources */,
    1442714438                                C14D306A24B79BE400480387 /* XPCEndpointClient.mm in Sources */,
     14439                                525080B0261BDE6C00678AEE /* XRDeviceInfo.mm in Sources */,
    1442814440                        );
    1442914441                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.