New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 796904 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
OoO until Feb 4th
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature
Team-Security-UX

Blocked on:
issue 804701

Blocking:
issue 755748



Sign in to add a comment

[sensors] Settings UI to control access to device sensors

Project Member Reported by alexande...@intel.com, Dec 21 2017

Issue description

In order to expose new sensor types [1,2], settings and disclosure UI has to be implemented.

Sensor API Permissions UX [3] defines following items:

- Global and per-site access control
- Location bar indicator
- Disclosure UI

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=695344
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=695347
[3] https://docs.google.com/document/d/1XThujZ2VJm0z0Gon1zbFkYhYo6K8nMxJjxNJ3wk9KHo
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4073666cea48f3dee77e27022a137577621029ff

commit 4073666cea48f3dee77e27022a137577621029ff
Author: Alexander Shalamov <alexander.shalamov@intel.com>
Date: Fri Jan 19 08:17:14 2018

[sensors] Add site settings entry for sensors

This CL adds Sensors entry to the site specific settings as well
as to the global settings. Access device's sensors is enabled by
default and allows users to disable access to device's sensors if
needed. In a follow-up CLs, PageInfo, disclosure UI and omnibox
indicators would be added.

Visibility of the new settings entry is controlled by
kGenericSensorExtraClasses feature flag.

Bug: 796904
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I1c3a991b211d3f9eef59ff351d32a2475094bc53
Reviewed-on: https://chromium-review.googlesource.com/833924
Commit-Queue: Alexander Shalamov <alexander.shalamov@intel.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Reviewed-by: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530450}
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/app/settings_strings.grdp
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/generic_sensor/sensor_permission_context.cc
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/icons.html
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/privacy_page/privacy_page.html
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/privacy_page/privacy_page.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/route.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/site_settings/category_default_setting.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/site_settings/constants.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/site_settings/site_details.html
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/site_settings/site_details.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/site_settings_page/site_settings_page.html
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/test/data/webui/settings/all_sites_tests.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/test/data/webui/settings/site_details_tests.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/test/data/webui/settings/site_list_tests.js
[modify] https://crrev.com/4073666cea48f3dee77e27022a137577621029ff/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js

Blockedon: 804701
Cc: juncai@chromium.org
Cc: srahim@chromium.org
Attaching screenshots from https://chromium-review.googlesource.com/c/chromium/src/+/836887 for srahim@ to review.
sensor_indicator_bubble_allow.png
49.3 KB View Download
sensor_indicator_bubble_block.png
49.3 KB View Download
sensor_indicator_tooltip_allow.png
16.3 KB View Download
sensor_indicator_tooltip_block.png
17.0 KB View Download
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ce5aab5bd1c4f1df74786072f115df338494ca48

commit ce5aab5bd1c4f1df74786072f115df338494ca48
Author: Alexander Shalamov <alexander.shalamov@intel.com>
Date: Wed Feb 07 11:45:15 2018

[sensors] Add Sensors item to PageInfo dialog

This CL adds Sensors setting item to PageInfo dialog.
The item is shown only when the setting value differs
from its defaults.

Bug: 796904
Change-Id: I50d44df221050d85a24991c1966d6a7576673029
Reviewed-on: https://chromium-review.googlesource.com/836467
Commit-Queue: Alexander Shalamov <alexander.shalamov@intel.com>
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534980}
[modify] https://crrev.com/ce5aab5bd1c4f1df74786072f115df338494ca48/chrome/app/vector_icons/BUILD.gn
[add] https://crrev.com/ce5aab5bd1c4f1df74786072f115df338494ca48/chrome/app/vector_icons/sensors.icon
[modify] https://crrev.com/ce5aab5bd1c4f1df74786072f115df338494ca48/chrome/browser/ui/page_info/page_info.cc
[modify] https://crrev.com/ce5aab5bd1c4f1df74786072f115df338494ca48/chrome/browser/ui/page_info/page_info_ui.cc
[modify] https://crrev.com/ce5aab5bd1c4f1df74786072f115df338494ca48/components/page_info_strings.grdp

srahim@ could you please also review strings for Android's site settings? Needed for https://chromium-review.googlesource.com/c/chromium/src/+/836558

https://chromium-review.googlesource.com/c/chromium/src/+/836558/6/chrome/android/java/strings/android_chrome_strings.grd



android_site_settings_list_item.png
50.4 KB View Download
android_site_settings_allow.png
31.8 KB View Download
android_site_settings_block.png
30.2 KB View Download
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/94c082d42d63ce1e43c126057c627dfedf2990bd

commit 94c082d42d63ce1e43c126057c627dfedf2990bd
Author: Alexander Shalamov <alexander.shalamov@intel.com>
Date: Fri Jun 01 15:02:28 2018

[sensors] Add sensors usage indicator

This CL adds indicator to the location bar to inform the user
that the web page is using device sensors. Clicking the indicator
allows the user to change site specific settings or go to corresponding
global content settings menu.

UI can be enabled by flipping kGenericSensorExtraClasses feature flag.

Bug: 796904
Change-Id: Idac4c1fdd04041dae27982e5c5173edc65e0679c
Reviewed-on: https://chromium-review.googlesource.com/836887
Commit-Queue: Alexander Shalamov <alexander.shalamov@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Cr-Commit-Position: refs/heads/master@{#563630}
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/app/generated_resources.grd
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/browser/content_settings/tab_specific_content_settings.cc
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/browser/generic_sensor/sensor_permission_context.cc
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/browser/generic_sensor/sensor_permission_context.h
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/browser/ui/content_settings/content_setting_image_model.cc
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/chrome/browser/ui/content_settings/content_setting_image_model.h
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/content/browser/generic_sensor/sensor_provider_proxy_impl.cc
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/content/browser/generic_sensor/sensor_provider_proxy_impl.h
[modify] https://crrev.com/94c082d42d63ce1e43c126057c627dfedf2990bd/tools/metrics/histograms/enums.xml

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f

commit 25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f
Author: Alexander Shalamov <alexander.shalamov@intel.com>
Date: Mon Jun 04 08:24:52 2018

[sensors][android] Add Sensors menu item to Site settings

Sensors settings item is added to Site settings menu and
allows to control access to device's sensors by switching
toggle button. New menu item is only visible when
kGenericSensorExtraClasses feature flag is enabled.

Bug: 796904
Change-Id: Ib7da1b54898f9e54e05cc5ebc0cc8b600d2a5807
Reviewed-on: https://chromium-review.googlesource.com/836558
Commit-Queue: Alexander Shalamov <alexander.shalamov@intel.com>
Reviewed-by: Theresa <twellington@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564018}
[add] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/res/drawable-hdpi/settings_sensors.png
[add] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/res/drawable-mdpi/settings_sensors.png
[add] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/res/drawable-xhdpi/settings_sensors.png
[add] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/res/drawable-xxhdpi/settings_sensors.png
[add] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/res/drawable-xxxhdpi/settings_sensors.png
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/res/xml/site_settings_preferences.xml
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/ContentSettingsResources.java
[add] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SensorsInfo.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java/strings/android_chrome_strings.grd
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/android/java_sources.gni
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/browser/android/chrome_feature_list.cc
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/browser/android/preferences/pref_service_bridge.cc
[modify] https://crrev.com/25e8992b1b079dbd1a9c71b82438d2c0b3efcf0f/chrome/browser/android/preferences/website_preference_bridge.cc

Cc: -mikhail....@intel.com
Owner: raphael....@intel.com
Status: Assigned (was: Started)
Labels: -Pri-3 M-72 Pri-1
As discussed offline, let's see if there is a way to launch these in M72.
Cc: engedy@chromium.org
Components: Internals>Permissions>Model UI>Browser>Permissions>Indicators

Sign in to add a comment