diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc index 0939e62b45530..ca2ac8ce23749 100644 --- chrome/browser/ui/webui/about/about_ui.cc +++ chrome/browser/ui/webui/about/about_ui.cc @@ -86,6 +86,10 @@ #include "third_party/zlib/google/compression_utils.h" #endif +#if BUILDFLAG(ENABLE_CEF) +#include "cef/grit/cef_resources.h" +#endif + using content::BrowserThread; namespace { @@ -533,6 +537,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) {} @@ -634,6 +643,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 46103729d33a7..fbc400e60239b 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 dd1c0af6d55ca..bf694c686434b 100644 --- chrome/browser/ui/webui/chrome_web_ui_configs.cc +++ chrome/browser/ui/webui/chrome_web_ui_configs.cc @@ -5,6 +5,7 @@ #include "chrome/browser/ui/webui/chrome_web_ui_configs.h" #include "build/build_config.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" @@ -209,6 +210,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 d94ad4f02b11d..c1100feeff7c6 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 8c8870763d73d..cc7ba0131fa0a 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" @@ -146,6 +147,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";