tree: 6b630bca271ceed104dcdf64e5d1208c0b2240c9 [path history] [tgz]
  1. DIR_METADATA
  2. generic_sensor_browsertest.cc
  3. OWNERS
  4. README.md
  5. sensor_provider_proxy_impl.cc
  6. sensor_provider_proxy_impl.h
  7. sensor_provider_proxy_impl_unittest.cc
content/browser/generic_sensor/README.md

Generic Sensors, //content part

This directory contains part of the Generic Sensors API implementation in Chromium. See the Blink README.md and the services README.md for more information about the architecture.

From a spec perspective, the code in SensorProviderProxyImpl implements the following steps together with Blink:

//content/browser/generic_sensor implements permission checks invoked by the Blink code, and acts as a bridge between Blink and //services/device/generic_sensor. When code in Blink invokes SensorProvider::GetSensor(), it reaches SensorProviderProxyImpl::GetSensor() in //content/browser/generic_sensor rather than SensorProviderImpl::GetSensor() in //services/device/generic_sensor. If all permission checks pass, SensorProviderProxyImpl::GetSensor() will forward the request from Blink to the //services layer by invoking SensorProviderImpl::GetSensor().

This directory also contains a few browser tests for the permission checks in generic_sensor_browsertest.cc. They are complemented by device_sensor_browsertest.cc.