Commit b6c4e590 authored by Jun Cai's avatar Jun Cai Committed by Commit Bot

Grant generic sensor permission for Android WebView

This CL adds code to grant generic sensor permission for Android
WebView so that the sensors needed by device motion and orientation can
be obtained from the generic sensor provider.

Note: This will not allow Android WebView to have access to all the
sensors that the generic sensor API provides since
SensorProviderImpl::GetSensor() is still guarded by
features::kGenericSensorExtraClasses flag. There is no new sensors
permission granted, and the sensors that are exposed on WebView by
this CL are those sensors that are already available on WebView
previously which are used to implement device motion/orientation
events.

Bug: 779443
Change-Id: I1405e54213bb07d1d781181e473fc77e89bb12ed
Reviewed-on: https://chromium-review.googlesource.com/759240
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarTao Bai <michaelbai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515285}
parent c17d4221
...@@ -501,7 +501,8 @@ PermissionStatus AwPermissionManager::GetPermissionStatus( ...@@ -501,7 +501,8 @@ PermissionStatus AwPermissionManager::GetPermissionStatus(
if (permission == PermissionType::PROTECTED_MEDIA_IDENTIFIER) { if (permission == PermissionType::PROTECTED_MEDIA_IDENTIFIER) {
return result_cache_->GetResult(permission, requesting_origin, return result_cache_->GetResult(permission, requesting_origin,
embedding_origin); embedding_origin);
} else if (permission == PermissionType::MIDI) { } else if (permission == PermissionType::MIDI ||
permission == PermissionType::SENSORS) {
return PermissionStatus::GRANTED; return PermissionStatus::GRANTED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment