0
Files
src/content/browser/generic_sensor
Peter Boström dd7e40ec31 Apply modernize-make-unique to content/
This is a large-scale change: go/chromium-modernize-make-unique

Bug: 1194272
Change-Id: Id035e6a5058ab109a4333f1b8f8225da1c6989e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2803034
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#869261}
2021-04-05 20:40:10 +00:00
..

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.