152 lines
6.0 KiB
Diff
152 lines
6.0 KiB
Diff
diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc
|
|
index 63e740fe81847..ea422ae7bbda4 100644
|
|
--- chrome/browser/ui/webui/about/about_ui.cc
|
|
+++ chrome/browser/ui/webui/about/about_ui.cc
|
|
@@ -92,6 +92,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 {
|
|
@@ -624,6 +628,11 @@ ChromeURLsUIConfig::ChromeURLsUIConfig()
|
|
CreditsUIConfig::CreditsUIConfig()
|
|
: AboutUIConfigBase(chrome::kChromeUICreditsHost) {}
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
+ChromeUILicenseConfig::ChromeUILicenseConfig()
|
|
+ : AboutUIConfigBase(chrome::kChromeUILicenseHost) {}
|
|
+#endif
|
|
+
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
TermsUIConfig::TermsUIConfig()
|
|
: AboutUIConfigBase(chrome::kChromeUITermsHost) {}
|
|
@@ -725,6 +734,16 @@ void AboutUIHTMLSource::StartDataRequest(
|
|
IDS_TERMS_HTML);
|
|
#endif
|
|
}
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
+ else if (source_name_ == chrome::kChromeUILicenseHost) {
|
|
+ response =
|
|
+ "<html><head><title>CEF License</title></head>"
|
|
+ "<body bgcolor=\"white\"><pre>" +
|
|
+ ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
|
|
+ IDR_CEF_LICENSE_TXT) +
|
|
+ "</pre></body></html>";
|
|
+ }
|
|
+#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 6548d519c3da9..645163f69f822 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"
|
|
@@ -42,6 +43,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 a1f43d79b6f9b..281ee1e2c8a41 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/ui/webui/about/about_ui.h"
|
|
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
|
|
#include "chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui.h"
|
|
@@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() {
|
|
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
|
|
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
|
|
map.AddWebUIConfig(std::make_unique<ChromeURLsUIConfig>());
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
+ map.AddWebUIConfig(std::make_unique<ChromeUILicenseConfig>());
|
|
+#endif
|
|
map.AddWebUIConfig(std::make_unique<ComponentsUIConfig>());
|
|
map.AddWebUIConfig(
|
|
std::make_unique<security_interstitials::ConnectionHelpUIConfig>());
|
|
diff --git chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
index 279f73938d406..c1bf263962e0c 100644
|
|
--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
+++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
@@ -18,6 +18,7 @@
|
|
#include "build/branding_buildflags.h"
|
|
#include "build/build_config.h"
|
|
#include "build/chromeos_buildflags.h"
|
|
+#include "cef/libcef/features/features.h"
|
|
#include "chrome/browser/about_flags.h"
|
|
#include "chrome/browser/buildflags.h"
|
|
#include "chrome/browser/commerce/shopping_service_factory.h"
|
|
@@ -538,6 +539,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() {
|
|
GURL(chrome::kChromeUIGpuURL),
|
|
GURL(chrome::kChromeUIHistogramsURL),
|
|
GURL(chrome::kChromeUIInspectURL),
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
+ GURL(chrome::kChromeUILicenseURL),
|
|
+#endif
|
|
GURL(chrome::kChromeUIManagementURL),
|
|
GURL(chrome::kChromeUINetExportURL),
|
|
GURL(chrome::kChromeUIPrefsInternalsURL),
|
|
diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc
|
|
index 248b6795e8cbe..c957f9d55613d 100644
|
|
--- chrome/common/webui_url_constants.cc
|
|
+++ chrome/common/webui_url_constants.cc
|
|
@@ -99,6 +99,9 @@ base::span<const base::cstring_view> 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 9fa26adc16d4f..32635f37b8846 100644
|
|
--- chrome/common/webui_url_constants.h
|
|
+++ chrome/common/webui_url_constants.h
|
|
@@ -18,6 +18,7 @@
|
|
#include "build/branding_buildflags.h"
|
|
#include "build/build_config.h"
|
|
#include "build/chromeos_buildflags.h"
|
|
+#include "cef/libcef/features/features.h"
|
|
#include "chrome/common/buildflags.h"
|
|
#include "components/lens/buildflags.h"
|
|
#include "components/signin/public/base/signin_buildflags.h"
|
|
@@ -157,6 +158,10 @@ inline constexpr char kChromeUILauncherInternalsURL[] =
|
|
inline constexpr char kChromeUILensSearchBubbleHost[] = "lens-search-bubble";
|
|
inline constexpr char kChromeUILensSearchBubbleURL[] =
|
|
"chrome://lens-search-bubble/";
|
|
+#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";
|