diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc index 4a28298d21ee8..b0044efb59bf5 100644 --- chrome/browser/ui/webui/about/about_ui.cc +++ chrome/browser/ui/webui/about/about_ui.cc @@ -90,6 +90,10 @@ #include "chrome/common/webui_url_constants.h" #endif // BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ENABLE_CEF) +#include "cef/grit/cef_resources.h" +#endif + using content::BrowserThread; namespace { @@ -537,6 +541,11 @@ ChromeURLsUIConfig::CreateWebUIController(content::WebUI* web_ui, CreditsUIConfig::CreditsUIConfig() : AboutUIConfigBase(chrome::kChromeUICreditsHost) {} +#if BUILDFLAG(ENABLE_CEF) +ChromeUILicenseConfig::ChromeUILicenseConfig() + : AboutUIConfigBase(chrome::kChromeUILicenseHost) {} +#endif + #if !BUILDFLAG(IS_ANDROID) TermsUIConfig::TermsUIConfig() : AboutUIConfigBase(chrome::kChromeUITermsHost) {} @@ -638,6 +647,16 @@ void AboutUIHTMLSource::StartDataRequest( IDS_TERMS_HTML); #endif } +#if BUILDFLAG(ENABLE_CEF) + else if (source_name_ == chrome::kChromeUILicenseHost) { + response = + "CEF License" + "
" +
+        ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
+            IDR_CEF_LICENSE_TXT) +
+        "
"; + } +#endif FinishDataRequest(response, std::move(callback)); } diff --git chrome/browser/ui/webui/about/about_ui.h chrome/browser/ui/webui/about/about_ui.h index 3f08e01880ef0..122cf9bacc2e3 100644 --- chrome/browser/ui/webui/about/about_ui.h +++ chrome/browser/ui/webui/about/about_ui.h @@ -11,6 +11,7 @@ #include "base/memory/raw_ptr.h" #include "build/build_config.h" +#include "cef/libcef/features/features.h" #include "content/public/browser/url_data_source.h" #include "content/public/browser/web_ui_controller.h" #include "content/public/browser/webui_config.h" @@ -47,6 +48,13 @@ class CreditsUIConfig : public AboutUIConfigBase { CreditsUIConfig(); }; +#if BUILDFLAG(ENABLE_CEF) +class ChromeUILicenseConfig : public AboutUIConfigBase { + public: + ChromeUILicenseConfig(); +}; +#endif + #if !BUILDFLAG(IS_ANDROID) // chrome://terms class TermsUIConfig : public AboutUIConfigBase { diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc index c86664f532a5d..1465b151f8704 100644 --- chrome/browser/ui/webui/chrome_web_ui_configs.cc +++ chrome/browser/ui/webui/chrome_web_ui_configs.cc @@ -6,6 +6,7 @@ #include "build/build_config.h" #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h" #include "chrome/browser/ui/webui/about/about_ui.h" #include "chrome/browser/ui/webui/accessibility/accessibility_ui.h" @@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() { map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); +#if BUILDFLAG(ENABLE_CEF) + map.AddWebUIConfig(std::make_unique()); +#endif map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc index 506d4ea46d297..b11a7b0325dc5 100644 --- chrome/common/webui_url_constants.cc +++ chrome/common/webui_url_constants.cc @@ -95,6 +95,9 @@ base::span ChromeURLHosts() { kChromeUIHistoryHost, history_clusters_internals::kChromeUIHistoryClustersInternalsHost, kChromeUIInterstitialHost, +#if BUILDFLAG(ENABLE_CEF) + kChromeUILicenseHost, +#endif kChromeUILocalStateHost, #if !BUILDFLAG(IS_ANDROID) kChromeUIManagementHost, diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h index a5e4b8cb32f40..5efd6d78c7dc9 100644 --- chrome/common/webui_url_constants.h +++ chrome/common/webui_url_constants.h @@ -17,6 +17,7 @@ #include "base/strings/cstring_view.h" #include "build/branding_buildflags.h" #include "build/build_config.h" +#include "cef/libcef/features/features.h" #include "chrome/common/buildflags.h" #include "components/signin/public/base/signin_buildflags.h" #include "content/public/common/url_constants.h" @@ -144,6 +145,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials"; inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/"; inline constexpr char kChromeUIKillHost[] = "kill"; inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals"; +#if BUILDFLAG(ENABLE_CEF) +inline constexpr char kChromeUILicenseHost[] = "license"; +inline constexpr char kChromeUILicenseURL[] = "chrome://license/"; +#endif inline constexpr char kChromeUILocalStateHost[] = "local-state"; inline constexpr char kChromeUILocationInternalsHost[] = "location-internals"; inline constexpr char kChromeUIManagementHost[] = "management";