Generic Sensor

third_party/blink/renderer/modules/sensor implements the following concrete sensor interfaces based on the [Generic Sensor API] (

  1. [Ambient Light Sensor] (
  2. [Accelerometer] (
  3. [Gyroscope] (
  4. [Magnetometer] (
  5. [Absolute Orientation Sensor] (

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


Sensors layout 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.