Commit 2de5c134 authored by Tymofii Chudakov's avatar Tymofii Chudakov Committed by Commit Bot

WebUI Settings: exceptions section redesign

Implemented exceptions section redesign of the content settings pages.
This CL includes redesign of the following content setting categories:
- ADS                              - MIDI_DEVICES
- AR                               - MIXEDSCRIPT
- AUTOMATIC_DOWNLOADS              - MOTION_SENSORS
- BACKGROUND_SYNC                  - PAYMENT_HANDLER
- CAMERA                           - PLUGINS
- CLIPBOARD                        - POPUPS
- FILE_SYSTEM_WRITE                - PROTECTED_CONTENT
- GEOLOCATION                      - SOUND
- IMAGES                           - UNSANDBOXED_PLUGINS
- JAVASCRIPT                       - VR
- MIC

Bug: 1113642
Change-Id: I843de142fa297323b795480cecc9ecaaafc18fe5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2403280
Commit-Queue: Tymofii Chudakov <tchudakov@chromium.org>
Reviewed-by: default avatarTheodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Reviewed-by: default avatarSean Harrison <harrisonsean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814639}
parent 937a7c66
...@@ -1636,6 +1636,9 @@ ...@@ -1636,6 +1636,9 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_DEFAULT_BEHAVIOR_DESCRIPTION" desc="Description for the site settings default behavior."> <message name="IDS_SETTINGS_SITE_SETTINGS_DEFAULT_BEHAVIOR_DESCRIPTION" desc="Description for the site settings default behavior.">
Sites automatically follow this setting when you visit them Sites automatically follow this setting when you visit them
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_CUSTOMIZED_BEHAVIORS" desc="Label for the site settings exceptions.">
Customized behaviors
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_ADS_DESCRIPTION" desc="Description of the ads content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_ADS_DESCRIPTION" desc="Description of the ads content setting.">
Sites usually show ads so they can provide content or services for free. But, some sites are known to show intrusive or misleading ads. Sites usually show ads so they can provide content or services for free. But, some sites are known to show intrusive or misleading ads.
</message> </message>
...@@ -1645,6 +1648,12 @@ ...@@ -1645,6 +1648,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_ADS_BLOCKED" desc="Label for the disabled option of the ads content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_ADS_BLOCKED" desc="Label for the disabled option of the ads content setting.">
Block ads on sites that show intrusive or misleading ads (recommended) Block ads on sites that show intrusive or misleading ads (recommended)
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_ADS_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the ads content setting.">
Allowed to show any ads
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_ADS_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the ads content setting.">
Not allowed to show intrusive or misleading ads
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_DESCRIPTION" desc="Description of the augmented reality content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_AR_DESCRIPTION" desc="Description of the augmented reality content setting.">
Sites usually track your camera position for AR features, like games or heads-up directions Sites usually track your camera position for AR features, like games or heads-up directions
</message> </message>
...@@ -1654,6 +1663,12 @@ ...@@ -1654,6 +1663,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_BLOCKED" desc="Label for the disabled option of the augmented reality content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_AR_BLOCKED" desc="Label for the disabled option of the augmented reality content setting.">
Block sites from tracking your camera position Block sites from tracking your camera position
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the augmented reality content setting.">
Allowed to track your camera position
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the augmented reality content setting.">
Not allowed to track your camera position
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_DESCRIPTION" desc="Description of the automatic downloads content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_DESCRIPTION" desc="Description of the automatic downloads content setting.">
Sites might automatically download related files together to save you time Sites might automatically download related files together to save you time
</message> </message>
...@@ -1663,6 +1678,12 @@ ...@@ -1663,6 +1678,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_BLOCKED" desc="Label for the disabled option of the automatic downloads content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_BLOCKED" desc="Label for the disabled option of the automatic downloads content setting.">
Block sites from automatically downloading multiple files Block sites from automatically downloading multiple files
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the automatic downloads content setting.">
Allowed to automatically download multiple files
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the automatic downloads content setting.">
Not allowed to automatically download multiple files
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_DESCRIPTION" desc="Description of the background sync content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_DESCRIPTION" desc="Description of the background sync content setting.">
After you leave or go offline, sites usually keep syncing to finish tasks, like uploading photos or sending a chat message After you leave or go offline, sites usually keep syncing to finish tasks, like uploading photos or sending a chat message
</message> </message>
...@@ -1672,6 +1693,12 @@ ...@@ -1672,6 +1693,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_BLOCKED" desc="Label for the disabled option of the background sync content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_BLOCKED" desc="Label for the disabled option of the background sync content setting.">
Block closed sites from sending and receiving data Block closed sites from sending and receiving data
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the background sync content setting.">
Allowed to finish sending and receiving data
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the background sync content setting.">
Not allowed to finish sending or receiving data
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_CAMERA_DESCRIPTION" desc="Description of the camera content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_CAMERA_DESCRIPTION" desc="Description of the camera content setting.">
Sites usually use your video camera for communication features like video chatting Sites usually use your video camera for communication features like video chatting
</message> </message>
...@@ -1684,6 +1711,12 @@ ...@@ -1684,6 +1711,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED_SUB_LABEL" desc="Sub-label for the disabled option of the camera content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED_SUB_LABEL" desc="Sub-label for the disabled option of the camera content setting.">
Features that need a camera won't work Features that need a camera won't work
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_CAMERA_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the camera content setting.">
Allowed to use your camera
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the camera content setting.">
Not allowed to use your camera
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_DESCRIPTION" desc="Description of the clipboard content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_DESCRIPTION" desc="Description of the clipboard content setting.">
Sites usually read your clipboard for features like keeping the formatting of text you copied Sites usually read your clipboard for features like keeping the formatting of text you copied
</message> </message>
...@@ -1693,6 +1726,12 @@ ...@@ -1693,6 +1726,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_BLOCKED" desc="Label for the disabled option of the clipboard content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_BLOCKED" desc="Label for the disabled option of the clipboard content setting.">
Block sites from seeing text and images on your clipboard Block sites from seeing text and images on your clipboard
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the clipboard content setting.">
Allowed to see your clipboard
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the clipboard content setting.">
Not allowed to see your clipboard
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_DESCRIPTION" desc="Description of the file system write content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_DESCRIPTION" desc="Description of the file system write content setting.">
Sites usually access files and folders on your device for features like automatically saving your work Sites usually access files and folders on your device for features like automatically saving your work
</message> </message>
...@@ -1702,6 +1741,9 @@ ...@@ -1702,6 +1741,9 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_BLOCKED" desc="Label for the disabled option of the file system write content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_BLOCKED" desc="Label for the disabled option of the file system write content setting.">
Block sites from editing files and folders on your device Block sites from editing files and folders on your device
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the file system write content setting.">
Not allowed to edit files and folders on your device
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_LOCATION_DESCRIPTION" desc="Description of the location content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_LOCATION_DESCRIPTION" desc="Description of the location content setting.">
Sites usually use your location for relevant features or info, like local news or nearby shops Sites usually use your location for relevant features or info, like local news or nearby shops
</message> </message>
...@@ -1714,6 +1756,12 @@ ...@@ -1714,6 +1756,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED_SUB_LABEL" desc="Sub-label for the disabled option of the location content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED_SUB_LABEL" desc="Sub-label for the disabled option of the location content setting.">
Features that need your location won't work Features that need your location won't work
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_LOCATION_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the location content setting.">
Allowed to see your location
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the blocked content setting.">
Not allowed to see your location
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_IMAGES_DESCRIPTION" desc="Description of the images content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_IMAGES_DESCRIPTION" desc="Description of the images content setting.">
Sites usually show images to provide illustration, like photos for online stores or news articles Sites usually show images to provide illustration, like photos for online stores or news articles
</message> </message>
...@@ -1723,6 +1771,12 @@ ...@@ -1723,6 +1771,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_IMAGES_BLOCKED" desc="Label for the disabled option of the images content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_IMAGES_BLOCKED" desc="Label for the disabled option of the images content setting.">
Block images Block images
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_IMAGES_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the images content setting.">
Allowed to show images
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_IMAGES_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the images content setting.">
Not allowed to show images
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_DESCRIPTION" desc="Description of the Javascript content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_DESCRIPTION" desc="Description of the Javascript content setting.">
Sites usually use Javascript to display interactive features, like video games or web forms Sites usually use Javascript to display interactive features, like video games or web forms
</message> </message>
...@@ -1732,6 +1786,12 @@ ...@@ -1732,6 +1786,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_BLOCKED" desc="Label for the disabled option of the Javascript content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_BLOCKED" desc="Label for the disabled option of the Javascript content setting.">
Block Javascript Block Javascript
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the Javascript content setting.">
Allowed to use Javascript
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the Javascript content setting.">
Not allowed to use Javascript
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MIC_DESCRIPTION" desc="Description of the microphone content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_MIC_DESCRIPTION" desc="Description of the microphone content setting.">
Sites usually use your microphone for communication features like video chatting Sites usually use your microphone for communication features like video chatting
</message> </message>
...@@ -1744,6 +1804,12 @@ ...@@ -1744,6 +1804,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED_SUB_LABEL" desc="Sub-label for the disabled option of the microphone content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED_SUB_LABEL" desc="Sub-label for the disabled option of the microphone content setting.">
Features that need a microphone won't work Features that need a microphone won't work
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MIC_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the microphone content setting.">
Allowed to use your microphone
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the microphone content setting.">
Not allowed to use your microphone
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MIDI_DESCRIPTION" desc="Description of the MIDI devices content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_MIDI_DESCRIPTION" desc="Description of the MIDI devices content setting.">
Sites usually connect to MIDI devices for features for creating and editing music Sites usually connect to MIDI devices for features for creating and editing music
</message> </message>
...@@ -1753,6 +1819,18 @@ ...@@ -1753,6 +1819,18 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_MIDI_BLOCKED" desc="Label for the disabled option of the MIDI devices content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_MIDI_BLOCKED" desc="Label for the disabled option of the MIDI devices content setting.">
Block sites from connecting to MIDI devices Block sites from connecting to MIDI devices
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MIDI_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the MIDI devices content setting.">
Allowed to connect to MIDI devices
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MIDI_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the MIDI devices content setting.">
Not allowed to connect to MIDI devices
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_INSECURE_CONTENT_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the insecure content content setting.">
Allowed to show insecure content
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_INSECURE_CONTENT_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the insecure content content setting.">
Not allowed to show insecure content
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_DESCRIPTION" desc="Description of the payment handlers content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_DESCRIPTION" desc="Description of the payment handlers content setting.">
Sites usually install payment handlers for shopping features like easier checkout Sites usually install payment handlers for shopping features like easier checkout
</message> </message>
...@@ -1762,6 +1840,12 @@ ...@@ -1762,6 +1840,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_BLOCKED" desc="Label for the disabled option of the payment handlers content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_BLOCKED" desc="Label for the disabled option of the payment handlers content setting.">
Block payment handlers Block payment handlers
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the payment handlers content setting.">
Allowed to install payment handlers
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the payment handlers content setting.">
Not allowed to install payment handlers
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_DESCRIPTION" desc="Description of the Flash content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_DESCRIPTION" desc="Description of the Flash content setting.">
Sites usually use Flash to play audio, video, or video games. Flash Player will no longer be supported after December 2020. Sites usually use Flash to play audio, video, or video games. Flash Player will no longer be supported after December 2020.
</message> </message>
...@@ -1771,6 +1855,12 @@ ...@@ -1771,6 +1855,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_BLOCKED" desc="Label for the disabled option of the Flash content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_BLOCKED" desc="Label for the disabled option of the Flash content setting.">
Block Flash (recommended) Block Flash (recommended)
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the Flash content setting.">
Allowed to use Flash
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the Flash content setting.">
Not allowed to use Flash
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_POPUPS_DESCRIPTION" desc="Description of the pop-ups content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_POPUPS_DESCRIPTION" desc="Description of the pop-ups content setting.">
Sites might send pop-ups to show ads, or use redirects to lead you to websites you may not want to visit Sites might send pop-ups to show ads, or use redirects to lead you to websites you may not want to visit
</message> </message>
...@@ -1780,6 +1870,12 @@ ...@@ -1780,6 +1870,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_POPUPS_BLOCKED" desc="Label for the disabled option of the pop-ups content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_POPUPS_BLOCKED" desc="Label for the disabled option of the pop-ups content setting.">
Block pop-ups and redirects (recommended) Block pop-ups and redirects (recommended)
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_POPUPS_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the pop-ups content setting.">
Allowed to send pop-ups and use redirects
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_POPUPS_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the pop-ups content setting.">
Not allowed to send pop-ups or use redirects
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_DESCRIPTION" desc="Description of the protected content content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_DESCRIPTION" desc="Description of the protected content content setting.">
When a site plays content protected by copyright, it might ask to recognize your device When a site plays content protected by copyright, it might ask to recognize your device
</message> </message>
...@@ -1789,6 +1885,12 @@ ...@@ -1789,6 +1885,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_BLOCKED" desc="Label for the disabled option of the protected content content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_BLOCKED" desc="Label for the disabled option of the protected content content setting.">
Block protected content Block protected content
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the protected content content setting.">
Allowed to play protected content
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the protected content content setting.">
Not allowed to play protected content
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_DESCRIPTION" desc="Description of the motion sensors content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_DESCRIPTION" desc="Description of the motion sensors content setting.">
Sites usually use your device's motion sensors for features like virtual reality or step counting Sites usually use your device's motion sensors for features like virtual reality or step counting
</message> </message>
...@@ -1801,6 +1903,12 @@ ...@@ -1801,6 +1903,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED_SUB_LABEL" desc="Sub label for the disabled option of the motion sensors content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED_SUB_LABEL" desc="Sub label for the disabled option of the motion sensors content setting.">
Features that need motion sensors won't work Features that need motion sensors won't work
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the motion sensors content setting.">
Allowed to use motion sensors
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the motion sensors content setting.">
Not allowed to use motion sensors
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_SERIAL_PORTS_DESCRIPTION" desc="Description of the serial ports content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_SERIAL_PORTS_DESCRIPTION" desc="Description of the serial ports content setting.">
Sites usually connect to serial devices for data transfer features, like setting up your network Sites usually connect to serial devices for data transfer features, like setting up your network
</message> </message>
...@@ -1819,6 +1927,12 @@ ...@@ -1819,6 +1927,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_SOUND_BLOCKED" desc="Label for the disabled option of the sound content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_SOUND_BLOCKED" desc="Label for the disabled option of the sound content setting.">
Mute sound Mute sound
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_SOUND_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the sound content setting.">
Allowed to play sound
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_SOUND_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the sound content setting.">
Not allowed to play sound
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_DESCRIPTION" desc="Description of the unsandboxed plugins content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_DESCRIPTION" desc="Description of the unsandboxed plugins content setting.">
Sites usually use plugins for features like streaming videos or installing apps Sites usually use plugins for features like streaming videos or installing apps
</message> </message>
...@@ -1828,6 +1942,12 @@ ...@@ -1828,6 +1942,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_BLOCKED" desc="Label for the disabled option of the unsandboxed plugins content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_BLOCKED" desc="Label for the disabled option of the unsandboxed plugins content setting.">
Block plugins from accessing your computer Block plugins from accessing your computer
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the unsandboxed plugins content setting.">
Allowed to use a plugin to access your computer
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the unsandboxed plugins content setting.">
Not allowed to use a plugin to access your computer
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_USB_DESCRIPTION" desc="Description of the USB devices content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_USB_DESCRIPTION" desc="Description of the USB devices content setting.">
Sites usually connect to USB devices for features like printing a document or saving to a storage device Sites usually connect to USB devices for features like printing a document or saving to a storage device
</message> </message>
...@@ -1846,6 +1966,12 @@ ...@@ -1846,6 +1966,12 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_BLOCKED" desc="Label for the disabled option of the virtual reality content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_VR_BLOCKED" desc="Label for the disabled option of the virtual reality content setting.">
Block sites from using virtual reality devices and data Block sites from using virtual reality devices and data
</message> </message>
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the virtual reality content setting.">
Allowed to use virtual reality devices and data
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the virtual reality content setting.">
Not allowed to use virtual reality devices and data
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_ZOOM_LEVELS_DESCRIPTION" desc="Description of the zoom levels content setting."> <message name="IDS_SETTINGS_SITE_SETTINGS_ZOOM_LEVELS_DESCRIPTION" desc="Description of the zoom levels content setting.">
You can set how much you zoom in or out on certain websites You can set how much you zoom in or out on certain websites
</message> </message>
......
193d685b80082e541b503afa0ed38a856379ec1c
\ No newline at end of file
193d685b80082e541b503afa0ed38a856379ec1c
\ No newline at end of file
85f577f64a6ab589365606c8806128c739a3bcea
\ No newline at end of file
85f577f64a6ab589365606c8806128c739a3bcea
\ No newline at end of file
1d65fa8ef567fb449b3500ad771859af40163ebd
\ No newline at end of file
1d65fa8ef567fb449b3500ad771859af40163ebd
\ No newline at end of file
3220bd231c6f721c1f3ba5b6dafe42a2378205ea
\ No newline at end of file
3220bd231c6f721c1f3ba5b6dafe42a2378205ea
\ No newline at end of file
870a67f6210d9924d8bb8419727e2e3696fe2f30
\ No newline at end of file
3b3ed455d5b4575a47a2b8320eed38d78f2585fd
\ No newline at end of file
3b3ed455d5b4575a47a2b8320eed38d78f2585fd
\ No newline at end of file
229ccefd8d8e84d5fada4f21d65f53de794ae81f
\ No newline at end of file
229ccefd8d8e84d5fada4f21d65f53de794ae81f
\ No newline at end of file
b203f05e2c681401cc1a3e12ef5350c0f36a2cfb
\ No newline at end of file
b203f05e2c681401cc1a3e12ef5350c0f36a2cfb
\ No newline at end of file
21024716de448062c3499f0df53b4ee300dd7f2d
\ No newline at end of file
21024716de448062c3499f0df53b4ee300dd7f2d
\ No newline at end of file
b83854ecb12e1febc59de9bb2d65a5f205fb3223
\ No newline at end of file
b83854ecb12e1febc59de9bb2d65a5f205fb3223
\ No newline at end of file
8fa010440ef4e5c899d944ff00ef5ac0ecfdfc98
\ No newline at end of file
8fa010440ef4e5c899d944ff00ef5ac0ecfdfc98
\ No newline at end of file
22e77bf3527ceacfa58abc65ed89aafa0836d218
\ No newline at end of file
22e77bf3527ceacfa58abc65ed89aafa0836d218
\ No newline at end of file
f71ba65aa5540bd4f45139dd77621181747a8c2f
\ No newline at end of file
f71ba65aa5540bd4f45139dd77621181747a8c2f
\ No newline at end of file
1dc8f04745d691c01bdd755ac38e33333cc26159
\ No newline at end of file
1dc8f04745d691c01bdd755ac38e33333cc26159
\ No newline at end of file
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
settings-collapse-radio-button .bullet-line:last-child { settings-collapse-radio-button .bullet-line:last-child {
padding-bottom: 12px; padding-bottom: 12px;
} }
#exceptionHeader {
padding: 0 var(--cr-section-padding);
}
</style> </style>
<picture> <picture>
<source <source
...@@ -136,6 +140,9 @@ ...@@ -136,6 +140,9 @@
<cr-link-row id="site-data-trigger" class="hr" <cr-link-row id="site-data-trigger" class="hr"
on-click="onSiteDataClick_" label="$i18n{siteSettingsCookieLink}"> on-click="onSiteDataClick_" label="$i18n{siteSettingsCookieLink}">
</cr-link-row> </cr-link-row>
<div id="exceptionHeader" hidden="[[!enableContentSettingsRedesign_]]">
<h2>$i18n{siteSettingsCustomizedBehaviors}</h2>
</div>
<site-list id="allowExceptionsList" <site-list id="allowExceptionsList"
category="[[cookiesContentSettingType_]]" category="[[cookiesContentSettingType_]]"
category-subtype="[[contentSetting_.ALLOW]]" category-subtype="[[contentSetting_.ALLOW]]"
......
...@@ -90,6 +90,14 @@ Polymer({ ...@@ -90,6 +90,14 @@ Polymer({
value: CookiePrimarySetting, value: CookiePrimarySetting,
}, },
/** @private */
enableContentSettingsRedesign_: {
type: Boolean,
value() {
return loadTimeData.getBoolean('enableContentSettingsRedesign');
}
},
/** /**
* Used for HTML bindings. This is defined as a property rather than * Used for HTML bindings. This is defined as a property rather than
* within the ready callback, because the value needs to be available * within the ready callback, because the value needs to be available
......
...@@ -98,20 +98,29 @@ ...@@ -98,20 +98,29 @@
<!-- TODO(https://crbug.com/1033607): use corresponding block <!-- TODO(https://crbug.com/1033607): use corresponding block
icons instead of generic ones throughout this page --> icons instead of generic ones throughout this page -->
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.AUTOMATIC_DOWNLOADS]]"
allow-header=
"$i18n{siteSettingsAutomaticDownloadsAllowedExceptions}"
block-header=
"$i18n{siteSettingsAutomaticDownloadsBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
toggle-off-label="$i18n{siteSettingsAutoDownloadBlock}" toggle-off-label="$i18n{siteSettingsAutoDownloadBlock}"
toggle-on-label= toggle-on-label=
"$i18n{siteSettingsAutoDownloadAskRecommended}" "$i18n{siteSettingsAutoDownloadAskRecommended}"
category="[[ContentSettingsTypes.AUTOMATIC_DOWNLOADS]]"> category="[[ContentSettingsTypes.AUTOMATIC_DOWNLOADS]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.AUTOMATIC_DOWNLOADS]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.AUTOMATIC_DOWNLOADS]]"
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/backgroundSync" no-search> <template is="dom-if" route-path="/content/backgroundSync" no-search>
...@@ -130,6 +139,14 @@ ...@@ -130,6 +139,14 @@
block-option-label="$i18n{siteSettingsBackgroundSyncBlocked}" block-option-label="$i18n{siteSettingsBackgroundSyncBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.BACKGROUND_SYNC]]"
allow-header=
"$i18n{siteSettingsBackgroundSyncAllowedExceptions}"
block-header=
"$i18n{siteSettingsBackgroundSyncBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -138,12 +155,13 @@ ...@@ -138,12 +155,13 @@
"$i18n{siteSettingsAllowRecentlyClosedSitesRecommended}" "$i18n{siteSettingsAllowRecentlyClosedSitesRecommended}"
category="[[ContentSettingsTypes.BACKGROUND_SYNC]]"> category="[[ContentSettingsTypes.BACKGROUND_SYNC]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.BACKGROUND_SYNC]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.BACKGROUND_SYNC]]"
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/camera" no-search> <template is="dom-if" route-path="/content/camera" no-search>
...@@ -166,6 +184,12 @@ ...@@ -166,6 +184,12 @@
"$i18n{siteSettingsCameraBlockedSubLabel}" "$i18n{siteSettingsCameraBlockedSubLabel}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.CAMERA]]" read-only-list
allow-header="$i18n{siteSettingsCameraAllowedExceptions}"
block-header="$i18n{siteSettingsCameraBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -174,12 +198,13 @@ ...@@ -174,12 +198,13 @@
toggle-on-label= toggle-on-label=
"$i18n{siteSettingsAskBeforeAccessingRecommended}"> "$i18n{siteSettingsAskBeforeAccessingRecommended}">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.CAMERA]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.CAMERA]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/cookies"> <template is="dom-if" route-path="/cookies">
...@@ -219,6 +244,12 @@ ...@@ -219,6 +244,12 @@
block-option-label="$i18n{siteSettingsImagesBlocked}" block-option-label="$i18n{siteSettingsImagesBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.IMAGES]]"
allow-header="$i18n{siteSettingsImagesAllowedExceptions}"
block-header="$i18n{siteSettingsImagedBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -226,12 +257,13 @@ ...@@ -226,12 +257,13 @@
toggle-off-label="$i18n{siteSettingsDontShowImages}" toggle-off-label="$i18n{siteSettingsDontShowImages}"
toggle-on-label="$i18n{siteSettingsShowAllRecommended}"> toggle-on-label="$i18n{siteSettingsShowAllRecommended}">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.IMAGES]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.IMAGES]]"
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/insecureContent" no-search> <template is="dom-if" route-path="/content/insecureContent" no-search>
...@@ -242,11 +274,24 @@ ...@@ -242,11 +274,24 @@
<div class="cr-row first"> <div class="cr-row first">
$i18n{siteSettingsInsecureContentBlock} $i18n{siteSettingsInsecureContentBlock}
</div> </div>
<category-setting-exceptions <template is="dom-if" if="[[enableContentSettingsRedesign_]]">
category="[[ContentSettingsTypes.MIXEDSCRIPT]]" <category-setting-exceptions
block-header="$i18n{siteSettingsBlock}" category="[[ContentSettingsTypes.MIXEDSCRIPT]]"
search-filter="[[searchFilter_]]"> allow-header=
</category-setting-exceptions> "$i18n{siteSettingsInsecureContentAllowedExceptions}"
block-header=
"$i18n{siteSettingsInsecureContentBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-setting-exceptions
category="[[ContentSettingsTypes.MIXEDSCRIPT]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/location" no-search> <template is="dom-if" route-path="/content/location" no-search>
...@@ -267,6 +312,12 @@ ...@@ -267,6 +312,12 @@
"$i18n{siteSettingsLocationBlockedSubLabel}" "$i18n{siteSettingsLocationBlockedSubLabel}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.GEOLOCATION]]" read-only-list
allow-header="$i18n{siteSettingsLocationAllowedExceptions}"
block-header="$i18n{siteSettingsLocationBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -275,12 +326,13 @@ ...@@ -275,12 +326,13 @@
"$i18n{siteSettingsAskBeforeAccessingRecommended}" "$i18n{siteSettingsAskBeforeAccessingRecommended}"
category="[[ContentSettingsTypes.GEOLOCATION]]"> category="[[ContentSettingsTypes.GEOLOCATION]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.GEOLOCATION]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.GEOLOCATION]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/handlers" no-search> <template is="dom-if" route-path="/handlers" no-search>
...@@ -321,6 +373,12 @@ ...@@ -321,6 +373,12 @@
block-option-label="$i18n{siteSettingsJavascriptBlocked}" block-option-label="$i18n{siteSettingsJavascriptBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.JAVASCRIPT]]"
allow-header="$i18n{siteSettingsJavascriptAllowedExceptions}"
block-header="$i18n{siteSettingsJavascriptBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -328,12 +386,13 @@ ...@@ -328,12 +386,13 @@
toggle-on-label="$i18n{siteSettingsAllowedRecommended}" toggle-on-label="$i18n{siteSettingsAllowedRecommended}"
category="[[ContentSettingsTypes.JAVASCRIPT]]"> category="[[ContentSettingsTypes.JAVASCRIPT]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.JAVASCRIPT]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.JAVASCRIPT]]"
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/sound" no-search> <template is="dom-if" route-path="/content/sound" no-search>
...@@ -369,11 +428,22 @@ ...@@ -369,11 +428,22 @@
on-settings-boolean-control-change="onBlockAutoplayToggleChange_" on-settings-boolean-control-change="onBlockAutoplayToggleChange_"
no-set-pref> no-set-pref>
</settings-toggle-button> </settings-toggle-button>
<category-setting-exceptions <template is="dom-if" if="[[enableContentSettingsRedesign_]]">
category="[[ContentSettingsTypes.SOUND]]" <category-setting-exceptions
block-header="$i18n{siteSettingsBlockSound}" category="[[ContentSettingsTypes.SOUND]]"
search-filter="[[searchFilter_]]"> allow-header="$i18n{siteSettingsSoundAllowedExceptions}"
</category-setting-exceptions> block-header="$i18n{siteSettingsSoundBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-setting-exceptions
category="[[ContentSettingsTypes.SOUND]]"
block-header="$i18n{siteSettingsBlockSound}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/microphone" no-search> <template is="dom-if" route-path="/content/microphone" no-search>
...@@ -395,6 +465,12 @@ ...@@ -395,6 +465,12 @@
block-option-sub-label="$i18n{siteSettingsMicBlockedSubLabel}" block-option-sub-label="$i18n{siteSettingsMicBlockedSubLabel}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.MIC]]" read-only-list
allow-header="$i18n{siteSettingsMicAllowedExceptions}"
block-header="$i18n{siteSettingsMicBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -403,12 +479,13 @@ ...@@ -403,12 +479,13 @@
toggle-on-label= toggle-on-label=
"$i18n{siteSettingsAskBeforeAccessingRecommended}"> "$i18n{siteSettingsAskBeforeAccessingRecommended}">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.MIC]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.MIC]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/sensors" no-search> <template is="dom-if" route-path="/content/sensors" no-search>
...@@ -428,6 +505,12 @@ ...@@ -428,6 +505,12 @@
"$i18n{siteSettingsMotionSensorsBlockedSubLabel}" "$i18n{siteSettingsMotionSensorsBlockedSubLabel}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.SENSORS]]" read-only-list
allow-header="$i18n{siteSettingsMotionSensorsAllowedExceptions}"
block-header="$i18n{siteSettingsMotionSensorsBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -435,12 +518,13 @@ ...@@ -435,12 +518,13 @@
toggle-on-label="$i18n{siteSettingsSensorsAllow}" toggle-on-label="$i18n{siteSettingsSensorsAllow}"
category="[[ContentSettingsTypes.SENSORS]]"> category="[[ContentSettingsTypes.SENSORS]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.SENSORS]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.SENSORS]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/notifications" no-search> <template is="dom-if" route-path="/content/notifications" no-search>
...@@ -471,6 +555,7 @@ ...@@ -471,6 +555,7 @@
<category-setting-exceptions <category-setting-exceptions
category="[[ContentSettingsTypes.NOTIFICATIONS]]" category="[[ContentSettingsTypes.NOTIFICATIONS]]"
block-header="$i18n{siteSettingsBlock}" block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]"> search-filter="[[searchFilter_]]">
</category-setting-exceptions> </category-setting-exceptions>
</settings-subpage> </settings-subpage>
...@@ -514,12 +599,28 @@ ...@@ -514,12 +599,28 @@
aria-label="$i18n{adobeFlashStorage}"></cr-icon-button> aria-label="$i18n{adobeFlashStorage}"></cr-icon-button>
</a> </a>
</if> </if>
<category-setting-exceptions <template is="dom-if" if="[[enableContentSettingsRedesign_]]">
category="[[ContentSettingsTypes.PLUGINS]]" <category-setting-exceptions
block-header="$i18n{siteSettingsBlock}" read-only-list category="[[ContentSettingsTypes.PLUGINS]]"
search-filter="[[searchFilter_]]" allow-header="$i18n{siteSettingsFlashAllowedExceptions}"
site-lists-have-discarded-exceptions="{{pluginsHasDiscardedExceptions_}}"> block-header="$i18n{siteSettingsFlashBlockedExceptions}"
</category-setting-exceptions> read-only-list
search-filter="[[searchFilter_]]"
site-lists-have-discarded-exceptions=
"{{pluginsHasDiscardedExceptions_}}">
</category-setting-exceptions>
</template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-setting-exceptions
category="[[ContentSettingsTypes.PLUGINS]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
read-only-list
search-filter="[[searchFilter_]]"
site-lists-have-discarded-exceptions=
"{{pluginsHasDiscardedExceptions_}}">
</category-setting-exceptions>
</template>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/popups" no-search> <template is="dom-if" route-path="/content/popups" no-search>
...@@ -537,6 +638,12 @@ ...@@ -537,6 +638,12 @@
block-option-label="$i18n{siteSettingsPopupsBlocked}" block-option-label="$i18n{siteSettingsPopupsBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.POPUPS]]"
allow-header="$i18n{siteSettingsPopupsAllowedExceptions}"
block-header="$i18n{siteSettingsPopupsBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -544,12 +651,13 @@ ...@@ -544,12 +651,13 @@
toggle-off-label="$i18n{siteSettingsBlockedRecommended}" toggle-off-label="$i18n{siteSettingsBlockedRecommended}"
toggle-on-label="$i18n{siteSettingsAllowed}"> toggle-on-label="$i18n{siteSettingsAllowed}">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.POPUPS]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.POPUPS]]"
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" if="[[enableSafeBrowsingSubresourceFilter_]]" <template is="dom-if" if="[[enableSafeBrowsingSubresourceFilter_]]"
...@@ -569,6 +677,13 @@ ...@@ -569,6 +677,13 @@
block-option-label="$i18n{siteSettingsAdsBlocked}" block-option-label="$i18n{siteSettingsAdsBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.ADS]]"
read-only-list
allow-header="$i18n{siteSettingsAdsAllowedExceptions}"
block-header="$i18n{siteSettingsAdsBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -576,13 +691,14 @@ ...@@ -576,13 +691,14 @@
toggle-off-label="$i18n{siteSettingsAdsBlockRecommended}" toggle-off-label="$i18n{siteSettingsAdsBlockRecommended}"
toggle-on-label="$i18n{siteSettingsAllowed}"> toggle-on-label="$i18n{siteSettingsAllowed}">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.ADS]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.ADS]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
</template> </template>
...@@ -603,6 +719,14 @@ ...@@ -603,6 +719,14 @@
"$i18n{siteSettingsUnsandboxedPluginsBlocked}" "$i18n{siteSettingsUnsandboxedPluginsBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.UNSANDBOXED_PLUGINS]]"
allow-header=
"$i18n{siteSettingsUnsandboxedPluginsAllowedExceptions}"
block-header=
"$i18n{siteSettingsUnsandboxedPluginsBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -611,12 +735,13 @@ ...@@ -611,12 +735,13 @@
"$i18n{siteSettingsUnsandboxedPluginsAskRecommended}" "$i18n{siteSettingsUnsandboxedPluginsAskRecommended}"
category="[[ContentSettingsTypes.UNSANDBOXED_PLUGINS]]"> category="[[ContentSettingsTypes.UNSANDBOXED_PLUGINS]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.UNSANDBOXED_PLUGINS]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.UNSANDBOXED_PLUGINS]]"
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/midiDevices" no-search> <template is="dom-if" route-path="/content/midiDevices" no-search>
...@@ -635,6 +760,12 @@ ...@@ -635,6 +760,12 @@
block-option-label="$i18n{siteSettingsMidiBlocked}" block-option-label="$i18n{siteSettingsMidiBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.MIDI_DEVICES]]" read-only-list
allow-header="$i18n{siteSettingsMidiAllowedExceptions}"
block-header="$i18n{siteSettingsMidiBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -643,12 +774,13 @@ ...@@ -643,12 +774,13 @@
"$i18n{siteSettingsMidiDevicesAskRecommended}" "$i18n{siteSettingsMidiDevicesAskRecommended}"
category="[[ContentSettingsTypes.MIDI_DEVICES]]"> category="[[ContentSettingsTypes.MIDI_DEVICES]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.MIDI_DEVICES]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.MIDI_DEVICES]]" read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/usbDevices" no-search> <template is="dom-if" route-path="/content/usbDevices" no-search>
...@@ -740,6 +872,13 @@ ...@@ -740,6 +872,13 @@
"$i18n{siteSettingsFileSystemWriteBlocked}" "$i18n{siteSettingsFileSystemWriteBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.FILE_SYSTEM_WRITE]]"
read-only-list
block-header=
"$i18n{siteSettingsFileSystemWriteBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -748,13 +887,14 @@ ...@@ -748,13 +887,14 @@
"$i18n{siteSettingsFileSystemWriteAskRecommended}" "$i18n{siteSettingsFileSystemWriteAskRecommended}"
category="[[ContentSettingsTypes.FILE_SYSTEM_WRITE]]"> category="[[ContentSettingsTypes.FILE_SYSTEM_WRITE]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.FILE_SYSTEM_WRITE]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.FILE_SYSTEM_WRITE]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/hidDevices" no-search> <template is="dom-if" route-path="/content/hidDevices" no-search>
...@@ -818,11 +958,24 @@ ...@@ -818,11 +958,24 @@
<if expr="chromeos"> <if expr="chromeos">
<template is="dom-if" <template is="dom-if"
if="[[prefs.settings.privacy.drm_enabled.value]]"> if="[[prefs.settings.privacy.drm_enabled.value]]">
<category-setting-exceptions <template is="dom-if" if="[[enableContentSettingsRedesign_]]">
category="[[ContentSettingsTypes.PROTECTED_CONTENT]]" <category-setting-exceptions
block-header="$i18n{siteSettingsBlock}" category="[[ContentSettingsTypes.PROTECTED_CONTENT]]"
search-filter="[[searchFilter_]]"> allow-header=
</category-setting-exceptions> "$i18n{siteSettingsProtectedContentAllowedExceptions}"
block-header=
"$i18n{siteSettingsProtectedContentBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-setting-exceptions
category="[[ContentSettingsTypes.PROTECTED_CONTENT]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template>
</template> </template>
</if> </if>
</settings-subpage> </settings-subpage>
...@@ -842,6 +995,12 @@ ...@@ -842,6 +995,12 @@
block-option-label="$i18n{siteSettingsClipboardBlocked}" block-option-label="$i18n{siteSettingsClipboardBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.CLIPBOARD]]"
allow-header="$i18n{siteSettingsClipboardAllowedExceptions}"
block-header="$i18n{siteSettingsClipboardBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -849,12 +1008,13 @@ ...@@ -849,12 +1008,13 @@
toggle-on-label="$i18n{siteSettingsClipboardAskRecommended}" toggle-on-label="$i18n{siteSettingsClipboardAskRecommended}"
category="[[ContentSettingsTypes.CLIPBOARD]]"> category="[[ContentSettingsTypes.CLIPBOARD]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.CLIPBOARD]]"
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.CLIPBOARD]]"
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" if="[[enablePaymentHandlerContentSetting_]]"> <template is="dom-if" if="[[enablePaymentHandlerContentSetting_]]">
...@@ -874,6 +1034,14 @@ ...@@ -874,6 +1034,14 @@
block-option-label="$i18n{siteSettingsPaymentHandlersBlocked}" block-option-label="$i18n{siteSettingsPaymentHandlersBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.PAYMENT_HANDLER]]"
allow-header=
"$i18n{siteSettingsPaymentHandlersAllowedExceptions}"
block-header=
"$i18n{siteSettingsPaymentHandlersBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -882,12 +1050,13 @@ ...@@ -882,12 +1050,13 @@
"$i18n{siteSettingsPaymentHandlerAllowRecommended}" "$i18n{siteSettingsPaymentHandlerAllowRecommended}"
category="[[ContentSettingsTypes.PAYMENT_HANDLER]]"> category="[[ContentSettingsTypes.PAYMENT_HANDLER]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.PAYMENT_HANDLER]]"
block-header="$i18n{siteSettingsBlocked}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.PAYMENT_HANDLER]]"
block-header="$i18n{siteSettingsBlocked}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
</template> </template>
...@@ -906,6 +1075,7 @@ ...@@ -906,6 +1075,7 @@
category="[[ContentSettingsTypes.BLUETOOTH_SCANNING]]" category="[[ContentSettingsTypes.BLUETOOTH_SCANNING]]"
read-only-list read-only-list
block-header="$i18n{siteSettingsBlock}" block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]"> search-filter="[[searchFilter_]]">
</category-setting-exceptions> </category-setting-exceptions>
</settings-subpage> </settings-subpage>
...@@ -926,6 +1096,13 @@ ...@@ -926,6 +1096,13 @@
block-option-label="$i18n{siteSettingsVrBlocked}" block-option-label="$i18n{siteSettingsVrBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.VR]]"
read-only-list
allow-header="$i18n{siteSettingsVrAllowedExceptions}"
block-header="$i18n{siteSettingsVrBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -934,13 +1111,14 @@ ...@@ -934,13 +1111,14 @@
"$i18n{siteSettingsVrAskRecommended}" "$i18n{siteSettingsVrAskRecommended}"
category="[[ContentSettingsTypes.VR]]"> category="[[ContentSettingsTypes.VR]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.VR]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.VR]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/ar" no-search> <template is="dom-if" route-path="/content/ar" no-search>
...@@ -958,6 +1136,13 @@ ...@@ -958,6 +1136,13 @@
block-option-label="$i18n{siteSettingsArBlocked}" block-option-label="$i18n{siteSettingsArBlocked}"
block-option-icon="settings:block"> block-option-icon="settings:block">
</settings-category-default-radio-group> </settings-category-default-radio-group>
<category-setting-exceptions
category="[[ContentSettingsTypes.AR]]"
read-only-list
allow-header="$i18n{siteSettingsArAllowedExceptions}"
block-header="$i18n{siteSettingsArBlockedExceptions}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<template is="dom-if" if="[[!enableContentSettingsRedesign_]]"> <template is="dom-if" if="[[!enableContentSettingsRedesign_]]">
<category-default-setting <category-default-setting
...@@ -966,13 +1151,14 @@ ...@@ -966,13 +1151,14 @@
"$i18n{siteSettingsArAskRecommended}" "$i18n{siteSettingsArAskRecommended}"
category="[[ContentSettingsTypes.AR]]"> category="[[ContentSettingsTypes.AR]]">
</category-default-setting> </category-default-setting>
<category-setting-exceptions
category="[[ContentSettingsTypes.AR]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</template> </template>
<category-setting-exceptions
category="[[ContentSettingsTypes.AR]]"
read-only-list
block-header="$i18n{siteSettingsBlock}"
search-filter="[[searchFilter_]]">
</category-setting-exceptions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/content/idleDetection" no-search> <template is="dom-if" route-path="/content/idleDetection" no-search>
...@@ -987,6 +1173,7 @@ ...@@ -987,6 +1173,7 @@
<category-setting-exceptions <category-setting-exceptions
category="[[ContentSettingsTypes.IDLE_DETECTION]]" category="[[ContentSettingsTypes.IDLE_DETECTION]]"
block-header="$i18n{siteSettingsBlock}" block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]"> search-filter="[[searchFilter_]]">
</category-setting-exceptions> </category-setting-exceptions>
</settings-subpage> </settings-subpage>
...@@ -1005,6 +1192,7 @@ ...@@ -1005,6 +1192,7 @@
<category-setting-exceptions <category-setting-exceptions
category="[[ContentSettingsTypes.WINDOW_PLACEMENT]]" category="[[ContentSettingsTypes.WINDOW_PLACEMENT]]"
block-header="$i18n{siteSettingsBlock}" block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]"> search-filter="[[searchFilter_]]">
</category-setting-exceptions> </category-setting-exceptions>
</settings-subpage> </settings-subpage>
...@@ -1023,6 +1211,7 @@ ...@@ -1023,6 +1211,7 @@
<category-setting-exceptions <category-setting-exceptions
category="[[ContentSettingsTypes.FONT_ACCESS]]" category="[[ContentSettingsTypes.FONT_ACCESS]]"
block-header="$i18n{siteSettingsBlock}" block-header="$i18n{siteSettingsBlock}"
allow-header="$i18n{siteSettingsAllow}"
search-filter="[[searchFilter_]]"> search-filter="[[searchFilter_]]">
</category-setting-exceptions> </category-setting-exceptions>
</settings-subpage> </settings-subpage>
......
<style include="settings-shared">
#exceptionHeader {
padding: 0 var(--cr-section-padding);
}
</style>
<div id="exceptionHeader" hidden="[[!enableContentSettingsRedesign_]]">
<h2>$i18n{siteSettingsCustomizedBehaviors}</h2>
</div>
<site-list <site-list
has-discarded-exceptions="{{blockSiteListHasDiscardedExceptions_}}" has-discarded-exceptions="{{blockSiteListHasDiscardedExceptions_}}"
category="[[category]]" category="[[category]]"
...@@ -18,7 +26,7 @@ ...@@ -18,7 +26,7 @@
has-discarded-exceptions="{{allowSiteListHasDiscardedExceptions_}}" has-discarded-exceptions="{{allowSiteListHasDiscardedExceptions_}}"
category="[[category]]" category="[[category]]"
category-subtype="[[ContentSetting.ALLOW]]" category-subtype="[[ContentSetting.ALLOW]]"
category-header="$i18n{siteSettingsAllow}" category-header="[[allowHeader]]"
read-only-list="[[getReadOnlyList_(readOnlyList, defaultManaged_)]]" read-only-list="[[getReadOnlyList_(readOnlyList, defaultManaged_)]]"
search-filter="[[searchFilter]]" search-filter="[[searchFilter]]"
hidden$="[[!showAllowSiteList_]]"> hidden$="[[!showAllowSiteList_]]">
......
...@@ -12,6 +12,7 @@ import './site_list.js'; ...@@ -12,6 +12,7 @@ import './site_list.js';
import {WebUIListenerBehavior} from 'chrome://resources/js/web_ui_listener_behavior.m.js'; import {WebUIListenerBehavior} from 'chrome://resources/js/web_ui_listener_behavior.m.js';
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {loadTimeData} from '../i18n_setup.js';
import {ContentSetting, ContentSettingsTypes, SiteSettingSource} from './constants.js'; import {ContentSetting, ContentSettingsTypes, SiteSettingSource} from './constants.js';
import {SiteSettingsBehavior} from './site_settings_behavior.js'; import {SiteSettingsBehavior} from './site_settings_behavior.js';
...@@ -52,6 +53,19 @@ Polymer({ ...@@ -52,6 +53,19 @@ Polymer({
*/ */
blockHeader: String, blockHeader: String,
/** @private */
enableContentSettingsRedesign_: {
type: Boolean,
value() {
return loadTimeData.getBoolean('enableContentSettingsRedesign');
}
},
/**
* The heading text for the allowed exception list.
*/
allowHeader: String,
searchFilter: String, searchFilter: String,
/** /**
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
</style> </style>
<div id="category"> <div id="category">
<div class="cr-row first"> <div class="cr-row first">
<h2 class="flex">[[categoryHeader]]</h2> <h2 class$="flex [[getCssClass_(enableContentSettingsRedesign_)]]">
[[categoryHeader]]
</h2>
<cr-button id="addSite" class="header-aligned-button" <cr-button id="addSite" class="header-aligned-button"
hidden$="[[!showAddSiteButton_]]" on-click="onAddSiteTap_"> hidden$="[[!showAddSiteButton_]]" on-click="onAddSiteTap_">
$i18n{add} $i18n{add}
......
...@@ -59,6 +59,14 @@ Polymer({ ...@@ -59,6 +59,14 @@ Polymer({
categoryHeader: String, categoryHeader: String,
/** @private */
enableContentSettingsRedesign_: {
type: Boolean,
value() {
return loadTimeData.getBoolean('enableContentSettingsRedesign');
}
},
/** /**
* The site serving as the model for the currently open action menu. * The site serving as the model for the currently open action menu.
* @private {?SiteException} * @private {?SiteException}
...@@ -538,4 +546,12 @@ Polymer({ ...@@ -538,4 +546,12 @@ Polymer({
computeHasDiscardedExceptions_() { computeHasDiscardedExceptions_() {
return this.sites.some(exception => exception.isDiscarded); return this.sites.some(exception => exception.isDiscarded);
}, },
/**
* @return {string}
* @private
*/
getCssClass_() {
return this.enableContentSettingsRedesign_ ? 'secondary' : '';
}
}); });
...@@ -1972,42 +1972,70 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source, ...@@ -1972,42 +1972,70 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
IDS_SETTINGS_SITE_SETTINGS_DEFAULT_BEHAVIOR}, IDS_SETTINGS_SITE_SETTINGS_DEFAULT_BEHAVIOR},
{"siteSettingsDefaultBehaviorDescription", {"siteSettingsDefaultBehaviorDescription",
IDS_SETTINGS_SITE_SETTINGS_DEFAULT_BEHAVIOR_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_DEFAULT_BEHAVIOR_DESCRIPTION},
{"siteSettingsCustomizedBehaviors",
IDS_SETTINGS_SITE_SETTINGS_CUSTOMIZED_BEHAVIORS},
{"siteSettingsAdsDescription", IDS_SETTINGS_SITE_SETTINGS_ADS_DESCRIPTION}, {"siteSettingsAdsDescription", IDS_SETTINGS_SITE_SETTINGS_ADS_DESCRIPTION},
{"siteSettingsAdsAllowed", IDS_SETTINGS_SITE_SETTINGS_ADS_ALLOWED}, {"siteSettingsAdsAllowed", IDS_SETTINGS_SITE_SETTINGS_ADS_ALLOWED},
{"siteSettingsAdsBlocked", IDS_SETTINGS_SITE_SETTINGS_ADS_BLOCKED}, {"siteSettingsAdsBlocked", IDS_SETTINGS_SITE_SETTINGS_ADS_BLOCKED},
{"siteSettingsAdsAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_ADS_ALLOWED_EXCEPTIONS},
{"siteSettingsAdsBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_ADS_BLOCKED_EXCEPTIONS},
{"siteSettingsArDescription", IDS_SETTINGS_SITE_SETTINGS_AR_DESCRIPTION}, {"siteSettingsArDescription", IDS_SETTINGS_SITE_SETTINGS_AR_DESCRIPTION},
{"siteSettingsArAllowed", IDS_SETTINGS_SITE_SETTINGS_AR_ALLOWED}, {"siteSettingsArAllowed", IDS_SETTINGS_SITE_SETTINGS_AR_ALLOWED},
{"siteSettingsArBlocked", IDS_SETTINGS_SITE_SETTINGS_AR_BLOCKED}, {"siteSettingsArBlocked", IDS_SETTINGS_SITE_SETTINGS_AR_BLOCKED},
{"siteSettingsArAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_AR_ALLOWED_EXCEPTIONS},
{"siteSettingsArBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_AR_BLOCKED_EXCEPTIONS},
{"siteSettingsAutomaticDownloadsDescription", {"siteSettingsAutomaticDownloadsDescription",
IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_DESCRIPTION},
{"siteSettingsAutomaticDownloadsAllowed", {"siteSettingsAutomaticDownloadsAllowed",
IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_ALLOWED},
{"siteSettingsAutomaticDownloadsBlocked", {"siteSettingsAutomaticDownloadsBlocked",
IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_BLOCKED},
{"siteSettingsAutomaticDownloadsAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_ALLOWED_EXCEPTIONS},
{"siteSettingsAutomaticDownloadsBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS_BLOCKED_EXCEPTIONS},
{"siteSettingsBackgroundSyncDescription", {"siteSettingsBackgroundSyncDescription",
IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_DESCRIPTION},
{"siteSettingsBackgroundSyncAllowed", {"siteSettingsBackgroundSyncAllowed",
IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_ALLOWED},
{"siteSettingsBackgroundSyncBlocked", {"siteSettingsBackgroundSyncBlocked",
IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_BLOCKED},
{"siteSettingsBackgroundSyncAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_ALLOWED_EXCEPTIONS},
{"siteSettingsBackgroundSyncBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_BACKGROUND_SYNC_BLOCKED_EXCEPTIONS},
{"siteSettingsCameraDescription", {"siteSettingsCameraDescription",
IDS_SETTINGS_SITE_SETTINGS_CAMERA_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_CAMERA_DESCRIPTION},
{"siteSettingsCameraAllowed", IDS_SETTINGS_SITE_SETTINGS_CAMERA_ALLOWED}, {"siteSettingsCameraAllowed", IDS_SETTINGS_SITE_SETTINGS_CAMERA_ALLOWED},
{"siteSettingsCameraBlocked", IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED}, {"siteSettingsCameraBlocked", IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED},
{"siteSettingsCameraBlockedSubLabel", {"siteSettingsCameraBlockedSubLabel",
IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED_SUB_LABEL}, IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED_SUB_LABEL},
{"siteSettingsCameraAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_CAMERA_ALLOWED_EXCEPTIONS},
{"siteSettingsCameraBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_CAMERA_BLOCKED_EXCEPTIONS},
{"siteSettingsClipboardDescription", {"siteSettingsClipboardDescription",
IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_DESCRIPTION},
{"siteSettingsClipboardAllowed", {"siteSettingsClipboardAllowed",
IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_ALLOWED},
{"siteSettingsClipboardBlocked", {"siteSettingsClipboardBlocked",
IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_BLOCKED},
{"siteSettingsClipboardAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_ALLOWED_EXCEPTIONS},
{"siteSettingsClipboardBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_CLIPBOARD_BLOCKED_EXCEPTIONS},
{"siteSettingsFileSystemWriteDescription", {"siteSettingsFileSystemWriteDescription",
IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_DESCRIPTION},
{"siteSettingsFileSystemWriteAllowed", {"siteSettingsFileSystemWriteAllowed",
IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_ALLOWED},
{"siteSettingsFileSystemWriteBlocked", {"siteSettingsFileSystemWriteBlocked",
IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_BLOCKED},
{"siteSettingsFileSystemWriteBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_FILE_SYSTEM_WRITE_BLOCKED_EXCEPTIONS},
{"siteSettingsLocationDescription", {"siteSettingsLocationDescription",
IDS_SETTINGS_SITE_SETTINGS_LOCATION_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_LOCATION_DESCRIPTION},
{"siteSettingsLocationAllowed", {"siteSettingsLocationAllowed",
...@@ -2016,45 +2044,85 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source, ...@@ -2016,45 +2044,85 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED},
{"siteSettingsLocationBlockedSubLabel", {"siteSettingsLocationBlockedSubLabel",
IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED_SUB_LABEL}, IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED_SUB_LABEL},
{"siteSettingsLocationAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_LOCATION_ALLOWED_EXCEPTIONS},
{"siteSettingsLocationBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_LOCATION_BLOCKED_EXCEPTIONS},
{"siteSettingsImagesDescription", {"siteSettingsImagesDescription",
IDS_SETTINGS_SITE_SETTINGS_IMAGES_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_IMAGES_DESCRIPTION},
{"siteSettingsImagesAllowed", IDS_SETTINGS_SITE_SETTINGS_IMAGES_ALLOWED}, {"siteSettingsImagesAllowed", IDS_SETTINGS_SITE_SETTINGS_IMAGES_ALLOWED},
{"siteSettingsImagesBlocked", IDS_SETTINGS_SITE_SETTINGS_IMAGES_BLOCKED}, {"siteSettingsImagesBlocked", IDS_SETTINGS_SITE_SETTINGS_IMAGES_BLOCKED},
{"siteSettingsImagesAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_IMAGES_ALLOWED_EXCEPTIONS},
{"siteSettingsImagedBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_IMAGES_BLOCKED_EXCEPTIONS},
{"siteSettingsJavascriptDescription", {"siteSettingsJavascriptDescription",
IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_DESCRIPTION},
{"siteSettingsJavascriptAllowed", {"siteSettingsJavascriptAllowed",
IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_ALLOWED},
{"siteSettingsJavascriptBlocked", {"siteSettingsJavascriptBlocked",
IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_BLOCKED},
{"siteSettingsJavascriptAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_ALLOWED_EXCEPTIONS},
{"siteSettingsJavascriptBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_BLOCKED_EXCEPTIONS},
{"siteSettingsMicDescription", IDS_SETTINGS_SITE_SETTINGS_MIC_DESCRIPTION}, {"siteSettingsMicDescription", IDS_SETTINGS_SITE_SETTINGS_MIC_DESCRIPTION},
{"siteSettingsMicAllowed", IDS_SETTINGS_SITE_SETTINGS_MIC_ALLOWED}, {"siteSettingsMicAllowed", IDS_SETTINGS_SITE_SETTINGS_MIC_ALLOWED},
{"siteSettingsMicBlocked", IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED}, {"siteSettingsMicBlocked", IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED},
{"siteSettingsMicBlockedSubLabel", {"siteSettingsMicBlockedSubLabel",
IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED_SUB_LABEL}, IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED_SUB_LABEL},
{"siteSettingsMicAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_MIC_ALLOWED_EXCEPTIONS},
{"siteSettingsMicBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_MIC_BLOCKED_EXCEPTIONS},
{"siteSettingsMidiDescription", {"siteSettingsMidiDescription",
IDS_SETTINGS_SITE_SETTINGS_MIDI_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_MIDI_DESCRIPTION},
{"siteSettingsMidiAllowed", IDS_SETTINGS_SITE_SETTINGS_MIDI_ALLOWED}, {"siteSettingsMidiAllowed", IDS_SETTINGS_SITE_SETTINGS_MIDI_ALLOWED},
{"siteSettingsMidiBlocked", IDS_SETTINGS_SITE_SETTINGS_MIDI_BLOCKED}, {"siteSettingsMidiBlocked", IDS_SETTINGS_SITE_SETTINGS_MIDI_BLOCKED},
{"siteSettingsMidiAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_MIDI_ALLOWED_EXCEPTIONS},
{"siteSettingsMidiBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_MIDI_BLOCKED_EXCEPTIONS},
{"siteSettingsInsecureContentAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_INSECURE_CONTENT_ALLOWED_EXCEPTIONS},
{"siteSettingsInsecureContentBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_INSECURE_CONTENT_BLOCKED_EXCEPTIONS},
{"siteSettingsPaymentHandlersDescription", {"siteSettingsPaymentHandlersDescription",
IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_DESCRIPTION},
{"siteSettingsPaymentHandlersAllowed", {"siteSettingsPaymentHandlersAllowed",
IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_ALLOWED},
{"siteSettingsPaymentHandlersBlocked", {"siteSettingsPaymentHandlersBlocked",
IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_BLOCKED},
{"siteSettingsPaymentHandlersAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_ALLOWED_EXCEPTIONS},
{"siteSettingsPaymentHandlersBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_PAYMENT_HANDLERS_BLOCKED_EXCEPTIONS},
{"siteSettingsFlashDescription", {"siteSettingsFlashDescription",
IDS_SETTINGS_SITE_SETTINGS_FLASH_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_FLASH_DESCRIPTION},
{"siteSettingsFlashAllowed", IDS_SETTINGS_SITE_SETTINGS_FLASH_ALLOWED}, {"siteSettingsFlashAllowed", IDS_SETTINGS_SITE_SETTINGS_FLASH_ALLOWED},
{"siteSettingsFlashBlocked", IDS_SETTINGS_SITE_SETTINGS_FLASH_BLOCKED}, {"siteSettingsFlashBlocked", IDS_SETTINGS_SITE_SETTINGS_FLASH_BLOCKED},
{"siteSettingsFlashAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_FLASH_ALLOWED_EXCEPTIONS},
{"siteSettingsFlashBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_FLASH_BLOCKED_EXCEPTIONS},
{"siteSettingsPopupsDescription", {"siteSettingsPopupsDescription",
IDS_SETTINGS_SITE_SETTINGS_POPUPS_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_POPUPS_DESCRIPTION},
{"siteSettingsPopupsAllowed", IDS_SETTINGS_SITE_SETTINGS_POPUPS_ALLOWED}, {"siteSettingsPopupsAllowed", IDS_SETTINGS_SITE_SETTINGS_POPUPS_ALLOWED},
{"siteSettingsPopupsBlocked", IDS_SETTINGS_SITE_SETTINGS_POPUPS_BLOCKED}, {"siteSettingsPopupsBlocked", IDS_SETTINGS_SITE_SETTINGS_POPUPS_BLOCKED},
{"siteSettingsPopupsAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_POPUPS_ALLOWED_EXCEPTIONS},
{"siteSettingsPopupsBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_POPUPS_BLOCKED_EXCEPTIONS},
{"siteSettingsProtectedContentDescription", {"siteSettingsProtectedContentDescription",
IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_DESCRIPTION},
{"siteSettingsProtectedContentAllowed", {"siteSettingsProtectedContentAllowed",
IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_ALLOWED},
{"siteSettingsProtectedContentBlocked", {"siteSettingsProtectedContentBlocked",
IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_BLOCKED},
{"siteSettingsProtectedContentAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_ALLOWED_EXCEPTIONS},
{"siteSettingsProtectedContentBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_PROTECTED_CONTENT_BLOCKED_EXCEPTIONS},
{"siteSettingsMotionSensorsDescription", {"siteSettingsMotionSensorsDescription",
IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_DESCRIPTION},
{"siteSettingsMotionSensorsAllowed", {"siteSettingsMotionSensorsAllowed",
...@@ -2063,6 +2131,10 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source, ...@@ -2063,6 +2131,10 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED},
{"siteSettingsMotionSensorsBlockedSubLabel", {"siteSettingsMotionSensorsBlockedSubLabel",
IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED_SUB_LABEL}, IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED_SUB_LABEL},
{"siteSettingsMotionSensorsAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_ALLOWED_EXCEPTIONS},
{"siteSettingsMotionSensorsBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_MOTION_SENSORS_BLOCKED_EXCEPTIONS},
{"siteSettingsSerialPortsDescription", {"siteSettingsSerialPortsDescription",
IDS_SETTINGS_SITE_SETTINGS_SERIAL_PORTS_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_SERIAL_PORTS_DESCRIPTION},
{"siteSettingsSerialPortsAllowed", {"siteSettingsSerialPortsAllowed",
...@@ -2073,18 +2145,30 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source, ...@@ -2073,18 +2145,30 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
IDS_SETTINGS_SITE_SETTINGS_SOUND_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_SOUND_DESCRIPTION},
{"siteSettingsSoundAllowed", IDS_SETTINGS_SITE_SETTINGS_SOUND_ALLOWED}, {"siteSettingsSoundAllowed", IDS_SETTINGS_SITE_SETTINGS_SOUND_ALLOWED},
{"siteSettingsSoundBlocked", IDS_SETTINGS_SITE_SETTINGS_SOUND_BLOCKED}, {"siteSettingsSoundBlocked", IDS_SETTINGS_SITE_SETTINGS_SOUND_BLOCKED},
{"siteSettingsSoundAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_SOUND_ALLOWED_EXCEPTIONS},
{"siteSettingsSoundBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_SOUND_BLOCKED_EXCEPTIONS},
{"siteSettingsUnsandboxedPluginsDescription", {"siteSettingsUnsandboxedPluginsDescription",
IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_DESCRIPTION},
{"siteSettingsUnsandboxedPluginsAllowed", {"siteSettingsUnsandboxedPluginsAllowed",
IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_ALLOWED}, IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_ALLOWED},
{"siteSettingsUnsandboxedPluginsBlocked", {"siteSettingsUnsandboxedPluginsBlocked",
IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_BLOCKED}, IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_BLOCKED},
{"siteSettingsUnsandboxedPluginsAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_ALLOWED_EXCEPTIONS},
{"siteSettingsUnsandboxedPluginsBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_UNSANDBOXED_PLUGINS_BLOCKED_EXCEPTIONS},
{"siteSettingsUsbDescription", IDS_SETTINGS_SITE_SETTINGS_USB_DESCRIPTION}, {"siteSettingsUsbDescription", IDS_SETTINGS_SITE_SETTINGS_USB_DESCRIPTION},
{"siteSettingsUsbAllowed", IDS_SETTINGS_SITE_SETTINGS_USB_ALLOWED}, {"siteSettingsUsbAllowed", IDS_SETTINGS_SITE_SETTINGS_USB_ALLOWED},
{"siteSettingsUsbBlocked", IDS_SETTINGS_SITE_SETTINGS_USB_BLOCKED}, {"siteSettingsUsbBlocked", IDS_SETTINGS_SITE_SETTINGS_USB_BLOCKED},
{"siteSettingsVrDescription", IDS_SETTINGS_SITE_SETTINGS_VR_DESCRIPTION}, {"siteSettingsVrDescription", IDS_SETTINGS_SITE_SETTINGS_VR_DESCRIPTION},
{"siteSettingsVrAllowed", IDS_SETTINGS_SITE_SETTINGS_VR_ALLOWED}, {"siteSettingsVrAllowed", IDS_SETTINGS_SITE_SETTINGS_VR_ALLOWED},
{"siteSettingsVrBlocked", IDS_SETTINGS_SITE_SETTINGS_VR_BLOCKED}, {"siteSettingsVrBlocked", IDS_SETTINGS_SITE_SETTINGS_VR_BLOCKED},
{"siteSettingsVrAllowedExceptions",
IDS_SETTINGS_SITE_SETTINGS_VR_ALLOWED_EXCEPTIONS},
{"siteSettingsVrBlockedExceptions",
IDS_SETTINGS_SITE_SETTINGS_VR_BLOCKED_EXCEPTIONS},
{"siteSettingsZoomLevelsDescription", {"siteSettingsZoomLevelsDescription",
IDS_SETTINGS_SITE_SETTINGS_ZOOM_LEVELS_DESCRIPTION}, IDS_SETTINGS_SITE_SETTINGS_ZOOM_LEVELS_DESCRIPTION},
{"siteSettingsAds", IDS_SETTINGS_SITE_SETTINGS_ADS}, {"siteSettingsAds", IDS_SETTINGS_SITE_SETTINGS_ADS},
......
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
// found in the LICENSE file. // found in the LICENSE file.
// clang-format off // clang-format off
import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {ContentSetting,ContentSettingProvider,ContentSettingsTypes,SiteSettingSource,SiteSettingsPrefsBrowserProxyImpl} from 'chrome://settings/lazy_load.js'; import {ContentSetting,ContentSettingProvider,ContentSettingsTypes,SiteSettingSource,SiteSettingsPrefsBrowserProxyImpl} from 'chrome://settings/lazy_load.js';
import {TestSiteSettingsPrefsBrowserProxy} from 'chrome://test/settings/test_site_settings_prefs_browser_proxy.js'; import {TestSiteSettingsPrefsBrowserProxy} from 'chrome://test/settings/test_site_settings_prefs_browser_proxy.js';
import {createContentSettingTypeToValuePair,createDefaultContentSetting,createSiteSettingsPrefs} from 'chrome://test/settings/test_util.js'; import {createContentSettingTypeToValuePair,createDefaultContentSetting,createSiteSettingsPrefs} from 'chrome://test/settings/test_util.js';
import {isChildVisible} from 'chrome://test/test_util.m.js';
// clang-format on // clang-format on
/** @fileoverview Suite of tests for category-setting-exceptions. */ /** @fileoverview Suite of tests for category-setting-exceptions. */
...@@ -23,6 +25,12 @@ suite('CategorySettingExceptions', function() { ...@@ -23,6 +25,12 @@ suite('CategorySettingExceptions', function() {
*/ */
let browserProxy = null; let browserProxy = null;
suiteSetup(function() {
loadTimeData.overrideValues({
enableContentSettingsRedesign: false,
});
});
// Initialize a category-setting-exceptions before each test. // Initialize a category-setting-exceptions before each test.
setup(function() { setup(function() {
browserProxy = new TestSiteSettingsPrefsBrowserProxy(); browserProxy = new TestSiteSettingsPrefsBrowserProxy();
...@@ -38,6 +46,10 @@ suite('CategorySettingExceptions', function() { ...@@ -38,6 +46,10 @@ suite('CategorySettingExceptions', function() {
assertTrue(!!testElement); assertTrue(!!testElement);
}); });
test('header visibility', function() {
assertFalse(isChildVisible(testElement, '#exceptionHeader'));
});
test( test(
'allow site list is hidden when showAllowSiteList_ is false', function() { 'allow site list is hidden when showAllowSiteList_ is false', function() {
testElement.showAllowSiteList_ = false; testElement.showAllowSiteList_ = false;
...@@ -182,3 +194,28 @@ suite('CategorySettingExceptions', function() { ...@@ -182,3 +194,28 @@ suite('CategorySettingExceptions', function() {
return Promise.all([initializationTest, updateTest]); return Promise.all([initializationTest, updateTest]);
}); });
}); });
suite('ContentSettingsRedesign', function() {
/**
* A site settings exceptions created before each test.
* @type {SiteSettingsExceptionsElement}
*/
let testElement;
suiteSetup(function() {
loadTimeData.overrideValues({
enableContentSettingsRedesign: true,
});
});
// Initialize a category-setting-exceptions before each test.
setup(function() {
PolymerTest.clearBody();
testElement = document.createElement('category-setting-exceptions');
document.body.appendChild(testElement);
});
test('header visibility', function() {
assertTrue(isChildVisible(testElement, '#exceptionHeader'));
});
});
...@@ -27,6 +27,12 @@ suite('CrSettingsCookiesPageTest', function() { ...@@ -27,6 +27,12 @@ suite('CrSettingsCookiesPageTest', function() {
/** @type {!SettingsCookiesPageElement} */ /** @type {!SettingsCookiesPageElement} */
let page; let page;
suiteSetup(function() {
loadTimeData.overrideValues({
enableContentSettingsRedesign: false,
});
});
setup(function() { setup(function() {
testMetricsBrowserProxy = new TestMetricsBrowserProxy(); testMetricsBrowserProxy = new TestMetricsBrowserProxy();
MetricsBrowserProxyImpl.instance_ = testMetricsBrowserProxy; MetricsBrowserProxyImpl.instance_ = testMetricsBrowserProxy;
...@@ -52,6 +58,7 @@ suite('CrSettingsCookiesPageTest', function() { ...@@ -52,6 +58,7 @@ suite('CrSettingsCookiesPageTest', function() {
test('ElementVisibility', async function() { test('ElementVisibility', async function() {
await flushTasks(); await flushTasks();
assertFalse(isChildVisible(page, '#exceptionHeader'));
assertTrue(isChildVisible(page, '#clearOnExit')); assertTrue(isChildVisible(page, '#clearOnExit'));
assertTrue(isChildVisible(page, '#doNotTrack')); assertTrue(isChildVisible(page, '#doNotTrack'));
assertTrue(isChildVisible(page, '#networkPrediction')); assertTrue(isChildVisible(page, '#networkPrediction'));
...@@ -193,3 +200,31 @@ suite('CrSettingsCookiesPageTest', function() { ...@@ -193,3 +200,31 @@ suite('CrSettingsCookiesPageTest', function() {
}); });
}); });
suite('ContentSettingsRedesign', function() {
/** @type {!SettingsCookiesPageElement} */
let page;
suiteSetup(function() {
loadTimeData.overrideValues({
enableContentSettingsRedesign: true,
});
});
setup(function() {
document.body.innerHTML = '';
page = /** @type {!SettingsCookiesPageElement} */ (
document.createElement('settings-cookies-page'));
page.prefs = {
generated: {
cookie_session_only: {value: false},
cookie_primary_setting:
{type: chrome.settingsPrivate.PrefType.NUMBER, value: 0},
},
};
document.body.appendChild(page);
});
test('HeaderVisibility', async function() {
assertTrue(isChildVisible(page, '#exceptionHeader'));
});
});
\ No newline at end of file
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