• Alex Cooper's avatar
    Rename Windows Mixed Reality Controllers for WebVR · 3d4ee7ac
    Alex Cooper authored
    This change switches the gamepad id of WMR controllers in chrome to
    match the value reported in Edge, which is of the format:
    Spatial Controller (Spatial Interaction Source) <vendor id>-<product id>
    
    This ensures the greatest compatibility with existing libraries and
    prevents fragmentation for developers.
    
    In order to expose this, the vendor id/product id are queried from the
    controller if available, and plumbed up through XRGamepad's VRPose
    by way of creating a device::Gamepad attached to a dummy
    XRInputSourceState.
    
    WMRController is created as a separate class (rather than simply adding
    Vendor/ProductId as properties on WMRInputSource), as that is also where
    methods for controller haptics live, and it would need to be split out
    at that time.
    
    Bug: 957281
    Change-Id: Ib17ebf0e274719c3d974800eb0c0deb96af321e5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636562
    Commit-Queue: Alexander Cooper <alcooper@chromium.org>
    Reviewed-by: default avatarBill Orr <billorr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#664908}
    3d4ee7ac
isolated_gamepad_data_fetcher.cc 9.5 KB