Generic Sensor

third_party/blink/renderer/modules/sensor implements the following concrete sensor interfaces based on the [Generic Sensor API] (https://w3c.github.io/sensors):

  1. [Ambient Light Sensor] (https://w3c.github.io/ambient-light)
  2. [Accelerometer] (https://w3c.github.io/accelerometer)
  3. [Gyroscope] (https://w3c.github.io/gyroscope)
  4. [Magnetometer] (https://w3c.github.io/magnetometer)
  5. [Absolute Orientation Sensor] (https://w3c.github.io/orientation-sensor)

The platform-specific parts of the implementation are located in services/device/generic_sensor.

Testing

Sensors web tests are located in web_tests/sensor.

Sensors browser tests are located in content/test/data/generic_sensor.

Design Documents

Please refer to the design documentation for more details.