Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3130)

Unified Diff: content/shell/browser/layout_test/layout_test_message_filter.cc

Issue 2797713002: [sensor][permission] Adding permission guard to sensors based on Generic Sensor.
Patch Set: blink format changes Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/permissions/resources/test-query.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/layout_test/layout_test_message_filter.cc
diff --git a/content/shell/browser/layout_test/layout_test_message_filter.cc b/content/shell/browser/layout_test/layout_test_message_filter.cc
index fe7ddf46c0a5a2d96031b50ca07c29f723c96f02..93d467af4f0012e73434eec86180ae198c9aee3c 100644
--- a/content/shell/browser/layout_test/layout_test_message_filter.cc
+++ b/content/shell/browser/layout_test/layout_test_message_filter.cc
@@ -171,6 +171,16 @@ void LayoutTestMessageFilter::OnSetPermission(
type = PermissionType::PROTECTED_MEDIA_IDENTIFIER;
} else if (name == "background-sync") {
type = PermissionType::BACKGROUND_SYNC;
+ } else if (name == "ambient-light-sensor") {
+ type = PermissionType::AMBIENT_LIGHT_SENSOR;
+ } else if (name == "accelerometer") {
+ type = PermissionType::ACCELEROMETER;
+ } else if (name == "gyroscope") {
+ type = PermissionType::GYROSCOPE;
+ } else if (name == "magnetometer") {
+ type = PermissionType::MAGNETOMETER;
+ } else if (name == "orientation-sensor") {
+ type = PermissionType::ORIENTATION_SENSOR;
} else {
NOTREACHED();
type = PermissionType::NOTIFICATIONS;
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/permissions/resources/test-query.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698