• Wenjie Shi's avatar
    Implement PlatformSensorReaderWinrt and · d016df33
    Wenjie Shi authored
    PlatformSensorReaderWinrtLightSensor
    
    As the third step for implementing usage of the
    Windows.Devices.Sensors WinRT API in Chromium, this CL:
      - Implements PlatformSensorReaderWinrtBase, the base class
        used to implement all of the Windows.Devices.Sensors based
        PlatformSensorReaders.
      - Implements PlatformSensorReaderWinrtLightSensor, the derived
        class of PlatformSensorReaderWinrtBase which adds support
        for light sensors using Windows.Devices.Sensors.LightSensor.
    There is heavy use of templates since the Windows.Devices.Sensors
    API is strongly typed.
    
    Verified functionally by:
      - Built chrome.exe.
      - Ran chrome.exe on laptop with light sensor.
      - Navigated to website that polls the W3C light sensor:
        - Verified light sensor could be polled with WinRT feature
          flag on and off.
      - Ran chrome.exe on laptop without light sensor.
      - Navigated to website that polls the W3C light sensor:
        - Verified the light sensor failed to instantiate with the
          WinRT feature flag on and off.
    Also ran new PlatformSensorReaderTestWinrt unit tests.
    
    Bug: 958266
    Change-Id: Iaa69d92f9e7923099653b4f554efc2852162b53f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1703327
    Commit-Queue: Wenjie Shi <wensh@microsoft.com>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#683005}
    d016df33
time.h 40.2 KB