#include "chrome/browser/ui/page_info/chrome_page_info_ui_delegate.h"
#include "base/feature_list.h"
#include "base/notreached.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/page_info/about_this_site_tab_helper.h"
#include "chrome/browser/page_info/page_info_features.h"
#include "chrome/browser/permissions/permission_manager_factory.h"
#include "chrome/browser/permissions/system/system_permission_settings.h"
#include "chrome/browser/privacy_sandbox/tracking_protection_settings_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/content_settings/core/common/features.h"
#include "components/page_info/core/about_this_site_service.h"
#include "components/page_info/core/features.h"
#include "components/permissions/permission_decision_auto_blocker.h"
#include "components/permissions/permission_manager.h"
#include "components/permissions/permissions_client.h"
#include "components/prefs/pref_service.h"
#include "components/privacy_sandbox/tracking_protection_settings.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/permission_controller.h"
#include "content/public/browser/permission_result.h"
#include "content/public/browser/web_contents.h"
#include "net/base/url_util.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/window_open_disposition_utils.h"
#include "ui/events/event.h"
#include "url/gurl.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/extensions/window_controller_list.h"
#include "chrome/browser/page_info/about_this_site_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/page_info/about_this_site_side_panel.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/web_applications/web_app_ui_utils.h"
#endif
#if BUILDFLAG(IS_MAC)
#include "base/mac/mac_util.h"
#include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h"
#include "chrome/browser/web_applications/os_integration/mac/app_shim_registry.h"
#include "chrome/browser/web_applications/os_integration/mac/web_app_shortcut_mac.h"
#include "chrome/browser/web_applications/web_app_tab_helper.h"
#endif
ChromePageInfoUiDelegate::ChromePageInfoUiDelegate(
content::WebContents* web_contents,
const GURL& site_url)
: … { … }
bool ChromePageInfoUiDelegate::ShouldShowAllow(ContentSettingsType type) { … }
std::u16string ChromePageInfoUiDelegate::GetAutomaticallyBlockedReason(
ContentSettingsType type) { … }
#if !BUILDFLAG(IS_ANDROID)
std::optional<page_info::proto::SiteInfo>
ChromePageInfoUiDelegate::GetAboutThisSiteInfo() { … }
void ChromePageInfoUiDelegate::OpenMoreAboutThisPageUrl(
const GURL& url,
const ui::Event& event) { … }
#endif
bool ChromePageInfoUiDelegate::ShouldShowAsk(ContentSettingsType type) { … }
#if !BUILDFLAG(IS_ANDROID)
bool ChromePageInfoUiDelegate::ShouldShowSiteSettings(int* link_text_id,
int* tooltip_text_id) { … }
bool ChromePageInfoUiDelegate::IsMultipleTabsOpen() { … }
void ChromePageInfoUiDelegate::OpenSiteSettingsFileSystem() { … }
void ChromePageInfoUiDelegate::ShowPrivacySandboxSettings() { … }
std::u16string ChromePageInfoUiDelegate::GetPermissionDetail(
ContentSettingsType type) { … }
bool ChromePageInfoUiDelegate::ShouldShowSettingsLinkForPermission(
ContentSettingsType type,
int* text_id,
int* link_id) { … }
void ChromePageInfoUiDelegate::SettingsLinkClicked(ContentSettingsType type) { … }
bool ChromePageInfoUiDelegate::IsBlockAutoPlayEnabled() { … }
#endif
content::PermissionResult ChromePageInfoUiDelegate::GetPermissionResult(
blink::PermissionType permission) { … }
bool ChromePageInfoUiDelegate::IsTrackingProtection3pcdEnabled() { … }
std::optional<content::PermissionResult>
ChromePageInfoUiDelegate::GetEmbargoResult(ContentSettingsType type) { … }
Profile* ChromePageInfoUiDelegate::GetProfile() const { … }