diff --git a/browser/resources/settings/BUILD.gn b/browser/resources/settings/BUILD.gn
index 7daaa9386624..a3daa95f1efe 100644
--- a/browser/resources/settings/BUILD.gn
+++ b/browser/resources/settings/BUILD.gn
@@ -113,6 +113,7 @@ preprocess_if_expr("preprocess") {
"brave_overrides/settings_menu.js",
"brave_overrides/settings_section.js",
"brave_overrides/settings_ui.js",
+ "brave_overrides/site_details.js",
"brave_overrides/site_settings_page.js",
"brave_overrides/sync_account_control.js",
"brave_overrides/sync_controls.js",
diff --git a/browser/resources/settings/brave_overrides/index.js b/browser/resources/settings/brave_overrides/index.js
index 420c34bc2951..3cb2c2f13d5d 100644
--- a/browser/resources/settings/brave_overrides/index.js
+++ b/browser/resources/settings/brave_overrides/index.js
@@ -11,6 +11,7 @@
import './config.js'
import { ContentSettingsTypes } from '../site_settings/constants.js'
+ContentSettingsTypes.AUTOPLAY = 'autoplay',
ContentSettingsTypes.ETHEREUM = 'ethereum'
import './about_page.js'
import './appearance_page.js'
@@ -33,6 +34,7 @@ import './security_page.js'
import './settings_menu.js'
import './settings_section.js'
import './settings_ui.js'
+import './site_details.js'
import './site_settings_page.js'
import './sync_account_control.js'
import './sync_controls.js'
diff --git a/browser/resources/settings/brave_overrides/privacy_page.js b/browser/resources/settings/brave_overrides/privacy_page.js
index c891a5717344..ba268b9987f3 100644
--- a/browser/resources/settings/brave_overrides/privacy_page.js
+++ b/browser/resources/settings/brave_overrides/privacy_page.js
@@ -12,18 +12,33 @@ RegisterPolymerTemplateModifications({
if (!pages) {
console.error(`[Brave Settings Overrides] Couldn't find privacy_page #pages`)
} else {
+ pages.insertAdjacentHTML('beforeend', `
+
+
+
+
+
+
+
+
+ `)
const isNativeBraveWalletEnabled = loadTimeData.getBoolean('isNativeBraveWalletFeatureEnabled')
if (isNativeBraveWalletEnabled) {
pages.insertAdjacentHTML('beforeend', `
diff --git a/browser/resources/settings/brave_overrides/site_details.js b/browser/resources/settings/brave_overrides/site_details.js
new file mode 100644
index 000000000000..e2fb788a5cbc
--- /dev/null
+++ b/browser/resources/settings/brave_overrides/site_details.js
@@ -0,0 +1,32 @@
+// Copyright (c) 2021 The Brave Authors. All rights reserved.
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
+// you can obtain one at http://mozilla.org/MPL/2.0/.
+
+import {RegisterPolymerTemplateModifications} from 'chrome://brave-resources/polymer_overriding.js'
+import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'
+
+RegisterPolymerTemplateModifications({
+ 'site-details': (templateContent) => {
+ const firstPermissionItem = templateContent.querySelector('div.list-frame > site-details-permission:nth-child(1)')
+ if (!firstPermissionItem) {
+ console.error(`[Brave Settings Overrides] Couldn't find first permission item`)
+ } else {
+ firstPermissionItem.insertAdjacentHTML('beforebegin', `
+
+
+ `)
+ const isNativeBraveWalletEnabled = loadTimeData.getBoolean('isNativeBraveWalletFeatureEnabled')
+ if (isNativeBraveWalletEnabled) {
+ firstPermissionItem.insertAdjacentHTML('beforebegin', `
+
+
+ `)
+ }
+ }
+ },
+})
diff --git a/chromium_src/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chromium_src/chrome/browser/ui/webui/settings/site_settings_helper.cc
index ecffb50b20b2..5b935b818af4 100644
--- a/chromium_src/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chromium_src/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -6,6 +6,8 @@
#define HasRegisteredGroupName HasRegisteredGroupName_ChromiumImpl
#define ContentSettingsTypeToGroupName \
ContentSettingsTypeToGroupName_ChromiumImpl
+#define GetVisiblePermissionCategoriesForOrigin \
+ GetVisiblePermissionCategoriesForOrigin_ChromiumImpl
// clang-format off
#define BRAVE_CONTENT_SETTINGS_TYPE_GROUP_NAMES_LIST \
@@ -31,6 +33,7 @@
#undef BRAVE_CONTENT_SETTINGS_TYPE_GROUP_NAMES_LIST
#undef BRAVE_SITE_SETTINGS_HELPER_CONTENT_SETTINGS_TYPE_FROM_GROUP_NAME
+#undef GetVisiblePermissionCategoriesForOrigin
#undef ContentSettingsTypeToGroupName
#undef HasRegisteredGroupName
@@ -52,4 +55,15 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) {
return ContentSettingsTypeToGroupName_ChromiumImpl(type);
}
+std::vector GetVisiblePermissionCategoriesForOrigin(
+ Profile* profile,
+ const GURL& origin) {
+ std::vector result =
+ GetVisiblePermissionCategoriesForOrigin_ChromiumImpl(profile, origin);
+ result.push_back(ContentSettingsType::AUTOPLAY);
+ result.push_back(ContentSettingsType::BRAVE_ETHEREUM);
+
+ return result;
+}
+
} // namespace site_settings
diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch
index b7271c730f14..1ffec017e1c5 100644
--- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch
+++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch
@@ -1,5 +1,5 @@
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
-index 07c8a1c383f4dbd94b89663394a2dbc69491e435..c0d7619d335801021f99de431c06597f58290eb1 100644
+index 07c8a1c383f4dbd94b89663394a2dbc69491e435..8e42b4766ef4896fbc09be4752fb760f4ea86925 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -29,6 +29,7 @@
@@ -40,23 +40,3 @@ index 07c8a1c383f4dbd94b89663394a2dbc69491e435..c0d7619d335801021f99de431c06597f
-
-
-+
-+
-+
-+
-+
-+
-+
-+
-
-
-
-+
-+
-
-