Commit 83a0fa31 authored by Alex Cooper's avatar Alex Cooper Committed by Commit Bot

Show AR/VR permission status on Desktop PageInfo

Shows the status of the AR/VR permissions on the Desktop PageInfo
bubble.

Android Permissions Bubble and site settings for both will be done in a
future change.

Bug: 1033592
Change-Id: I0a4ffebbdb92af19dd06ab4092f1c1b4f507ee82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992583
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731889}
parent 607f802e
......@@ -142,6 +142,8 @@ ContentSettingsType kPermissionType[] = {
ContentSettingsType::NATIVE_FILE_SYSTEM_WRITE_GUARD,
#endif
ContentSettingsType::BLUETOOTH_SCANNING,
ContentSettingsType::VR,
ContentSettingsType::AR,
};
// Checks whether this permission is currently the factory default, as set by
......
......@@ -184,6 +184,8 @@ base::span<const PermissionsUIInfo> GetContentSettingsUIInfo() {
{ContentSettingsType::BLUETOOTH_SCANNING,
IDS_PAGE_INFO_TYPE_BLUETOOTH_SCANNING},
{ContentSettingsType::NFC, IDS_PAGE_INFO_TYPE_NFC},
{ContentSettingsType::VR, IDS_PAGE_INFO_TYPE_VR},
{ContentSettingsType::AR, IDS_PAGE_INFO_TYPE_AR},
};
return kPermissionsUIInfo;
}
......@@ -625,6 +627,10 @@ const gfx::ImageSkia PageInfoUI::GetPermissionIcon(const PermissionInfo& info,
case ContentSettingsType::NATIVE_FILE_SYSTEM_WRITE_GUARD:
icon = &kSaveOriginalFileIcon;
break;
case ContentSettingsType::VR:
case ContentSettingsType::AR:
icon = &kVrHeadsetIcon;
break;
default:
// All other |ContentSettingsType|s do not have icons on desktop or are
// not shown in the Page Info bubble.
......
......@@ -281,6 +281,13 @@
</message>
<message name="IDS_PAGE_INFO_TYPE_NFC" desc="The label used for the NFC permission controls in the Page Info popup.">
NFC devices
</message>
<!-- TODO(crbug.com/1041009): Finalize WebXr Permissions strings -->
<message name="IDS_PAGE_INFO_TYPE_VR" desc="The label used for the VR permission controls in the Page Info popup.">
Virtual Reality
</message>
<message name="IDS_PAGE_INFO_TYPE_AR" desc="The label used for the AR permission controls in the Page Info popup.">
Augmented Reality
</message>
<!-- TODO(crbug.com/716303): A few permissions are missing here. -->
......
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