Commit 44b5f447 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Add "Protected content" to PageInfo on ChromeOS

When the "Protected content" permission decision is different from the
default value, "Protected content" will show up in the PageInfo.

See screenshots at:
https://photos.app.goo.gl/Rmd5S75gTUNU7vZVA

Similar change on Android will be done in a separate CL.

Bug: 593210
Test: Manually tested. See screenshots linked above.
Change-Id: I4200ec867f143edc67a1215dc9dc755575c89a04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1900113Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713560}
parent 241a69f6
......@@ -85,6 +85,7 @@ aggregate_vector_icons("chrome_vector_icons") {
"photo_camera.icon",
"picture_in_picture_control_background.icon",
"picture_in_picture_alt.icon",
"protected_content.icon",
"qrcode_generator.icon",
"reader_mode.icon",
"reload_touch.icon",
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 24,
MOVE_TO, 21, 17,
H_LINE_TO, 3,
V_LINE_TO, 5,
R_H_LINE_TO, 18,
R_V_LINE_TO, 12,
CLOSE,
R_MOVE_TO, 0, -14,
H_LINE_TO, 3,
R_CUBIC_TO, -1.11f, 0, -2, 0.89f, -2, 2,
R_V_LINE_TO, 12,
R_ARC_TO, 2, 2, 0, 0, 0, 2, 2,
R_H_LINE_TO, 5,
R_V_LINE_TO, 2,
R_H_LINE_TO, 8,
R_V_LINE_TO, -2,
R_H_LINE_TO, 5,
R_CUBIC_TO, 1.1f, 0, 1.99f, -0.9f, 1.99f, -2,
LINE_TO, 23, 5,
R_ARC_TO, 2, 2, 0, 0, 0, -2, -2,
CLOSE,
MOVE_TO, 10, 15,
R_LINE_TO, -4, -3.82f,
R_LINE_TO, 1.41f, -1.35f,
LINE_TO, 10, 12.3f,
LINE_TO, 16.59f, 6,
LINE_TO, 18, 7.36f,
LINE_TO, 10, 15,
CLOSE
......@@ -130,6 +130,9 @@ ContentSettingsType kPermissionType[] = {
ContentSettingsType::BACKGROUND_SYNC,
ContentSettingsType::SOUND,
ContentSettingsType::AUTOMATIC_DOWNLOADS,
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
ContentSettingsType::PROTECTED_MEDIA_IDENTIFIER,
#endif
ContentSettingsType::AUTOPLAY,
ContentSettingsType::MIDI_SYSEX,
ContentSettingsType::CLIPBOARD_READ,
......
......@@ -164,6 +164,10 @@ base::span<const PermissionsUIInfo> GetContentSettingsUIInfo() {
IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL},
{ContentSettingsType::MIDI_SYSEX, IDS_PAGE_INFO_TYPE_MIDI_SYSEX},
{ContentSettingsType::BACKGROUND_SYNC, IDS_PAGE_INFO_TYPE_BACKGROUND_SYNC},
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
{ContentSettingsType::PROTECTED_MEDIA_IDENTIFIER,
IDS_PAGE_INFO_TYPE_PROTECTED_MEDIA_IDENTIFIER},
#endif
{ContentSettingsType::AUTOPLAY, IDS_PAGE_INFO_TYPE_AUTOPLAY},
{ContentSettingsType::ADS, IDS_PAGE_INFO_TYPE_ADS},
{ContentSettingsType::SOUND, IDS_PAGE_INFO_TYPE_SOUND},
......@@ -583,6 +587,11 @@ const gfx::ImageSkia PageInfoUI::GetPermissionIcon(const PermissionInfo& info,
case ContentSettingsType::AUTOMATIC_DOWNLOADS:
icon = &kFileDownloadIcon;
break;
#if defined(OS_CHROMEOS)
case ContentSettingsType::PROTECTED_MEDIA_IDENTIFIER:
icon = &kProtectedContentIcon;
break;
#endif
case ContentSettingsType::MIDI_SYSEX:
icon = &vector_icons::kMidiIcon;
break;
......@@ -604,11 +613,9 @@ const gfx::ImageSkia PageInfoUI::GetPermissionIcon(const PermissionInfo& info,
case ContentSettingsType::USB_GUARD:
icon = &vector_icons::kUsbIcon;
break;
#if !defined(OS_ANDROID)
case ContentSettingsType::SERIAL_GUARD:
icon = &vector_icons::kSerialPortIcon;
break;
#endif
case ContentSettingsType::BLUETOOTH_SCANNING:
icon = &vector_icons::kBluetoothScanningIcon;
break;
......
......@@ -204,7 +204,7 @@ class PageInfoUI {
// Returns the connection icon ID for the given connection |status|.
static int GetConnectionIconID(PageInfo::SiteConnectionStatus status);
#else
#else // !defined(OS_ANDROID)
// Returns icons for the given PermissionInfo |info|. If |info|'s current
// setting is CONTENT_SETTING_DEFAULT, it will return the icon for |info|'s
// default setting.
......
......@@ -225,6 +225,9 @@
<message name="IDS_PAGE_INFO_TYPE_ADS" desc="The label used for the ads permission controls in the Page Info popup.">
Ads
</message>
<message name="IDS_PAGE_INFO_TYPE_PROTECTED_MEDIA_IDENTIFIER" desc="The label used for the protected media identifier permission controls in the Page Info popup.">
Protected content
</message>
<message name="IDS_PAGE_INFO_TYPE_AUTOPLAY" desc="The label used for the autoplay permission controls in the Page Info popup.">
Autoplay
</message>
......
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