tree: 97e507a38ffd2e3a9603fab91daf2b3f661819f0 [path history] [tgz]
  1. testing/
  2. absolute_orientation_sensor.cc
  3. absolute_orientation_sensor.h
  4. absolute_orientation_sensor.idl
  5. accelerometer.cc
  6. accelerometer.h
  7. accelerometer.idl
  8. ambient_light_sensor.cc
  9. ambient_light_sensor.h
  10. ambient_light_sensor.idl
  11. BUILD.gn
  12. DEPS
  13. DIR_METADATA
  14. gravity_sensor.cc
  15. gravity_sensor.h
  16. gravity_sensor.idl
  17. gyroscope.cc
  18. gyroscope.h
  19. gyroscope.idl
  20. linear_acceleration_sensor.cc
  21. linear_acceleration_sensor.h
  22. linear_acceleration_sensor.idl
  23. magnetometer.cc
  24. magnetometer.h
  25. magnetometer.idl
  26. orientation_sensor.cc
  27. orientation_sensor.h
  28. orientation_sensor.idl
  29. OWNERS
  30. README.md
  31. relative_orientation_sensor.cc
  32. relative_orientation_sensor.h
  33. relative_orientation_sensor.idl
  34. sensor.cc
  35. sensor.h
  36. sensor.idl
  37. sensor_error_event.cc
  38. sensor_error_event.h
  39. sensor_error_event.idl
  40. sensor_error_event_init.idl
  41. sensor_options.idl
  42. sensor_provider_proxy.cc
  43. sensor_provider_proxy.h
  44. sensor_proxy.cc
  45. sensor_proxy.h
  46. sensor_proxy_impl.cc
  47. sensor_proxy_impl.h
  48. sensor_reading_remapper.cc
  49. sensor_reading_remapper.h
  50. sensor_test_utils.cc
  51. sensor_test_utils.h
  52. spatial_sensor_options.idl
third_party/blink/renderer/modules/sensor/README.md

Generic Sensor API

This directory contains the Blink part (including the JavaScript APIs exposed to users) of the Generic Sensor API.

The following concrete sensor interfaces are currently implemented:

  1. Ambient Light Sensor
  2. Accelerometer, Gravity Sensor and Linear Acceleration Sensor
  3. Gyroscope
  4. Magnetometer
  5. Absolute Orientation Sensor and Relative Orientation Sensor

Some of the interfaces above depend on the SensorExtraClasses runtime flag.

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

Testing

Sensors web tests are part of the web-platform-tests project and are located in multiple directories under web_tests/external/wpt. For example , web_tests/external/wpt/accelerometer. The sensor-agnostic parts of the tests are located in web_tests/external/wpt/generic-sensor.

Browser tests are located in content/browser/generic_sensor.

Overall architecture

The current design of the Chromium implementation of the Generic Sensor API is described in services/device/generic_sensor.