2024-07-03 13:07:46 -04:00
|
|
|
diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc
|
2024-12-09 12:58:46 -05:00
|
|
|
index d8205f05e45fb..fd867040ec470 100644
|
2024-07-03 13:07:46 -04:00
|
|
|
--- chrome/browser/ui/webui/about/about_ui.cc
|
|
|
|
+++ chrome/browser/ui/webui/about/about_ui.cc
|
2024-12-09 12:58:46 -05:00
|
|
|
@@ -90,6 +90,10 @@
|
2024-07-03 13:07:46 -04:00
|
|
|
#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 {
|
2024-12-09 12:58:46 -05:00
|
|
|
@@ -541,6 +545,11 @@ ChromeURLsUIConfig::CreateWebUIController(content::WebUI* web_ui,
|
2024-08-26 12:44:25 +00:00
|
|
|
CreditsUIConfig::CreditsUIConfig()
|
|
|
|
: AboutUIConfigBase(chrome::kChromeUICreditsHost) {}
|
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ChromeUILicenseConfig::ChromeUILicenseConfig()
|
|
|
|
+ : AboutUIConfigBase(chrome::kChromeUILicenseHost) {}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
|
|
TermsUIConfig::TermsUIConfig()
|
|
|
|
: AboutUIConfigBase(chrome::kChromeUITermsHost) {}
|
2024-12-09 12:58:46 -05:00
|
|
|
@@ -642,6 +651,16 @@ void AboutUIHTMLSource::StartDataRequest(
|
2024-07-03 13:07:46 -04:00
|
|
|
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));
|
|
|
|
}
|
2024-08-26 12:44:25 +00:00
|
|
|
diff --git chrome/browser/ui/webui/about/about_ui.h chrome/browser/ui/webui/about/about_ui.h
|
2024-12-09 12:58:46 -05:00
|
|
|
index 1b8d354f098b8..e7ea1c3329918 100644
|
2024-08-26 12:44:25 +00:00
|
|
|
--- 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"
|
2024-12-09 12:58:46 -05:00
|
|
|
@@ -47,6 +48,13 @@ class CreditsUIConfig : public AboutUIConfigBase {
|
2024-08-26 12:44:25 +00:00
|
|
|
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
|
2024-12-09 12:58:46 -05:00
|
|
|
index a2719d73bc701..3cc832d90e17a 100644
|
2024-08-26 12:44:25 +00:00
|
|
|
--- 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"
|
2024-11-14 17:07:03 -05:00
|
|
|
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
|
2024-08-26 12:44:25 +00:00
|
|
|
#include "chrome/browser/ui/webui/about/about_ui.h"
|
|
|
|
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
|
2024-12-09 12:58:46 -05:00
|
|
|
@@ -210,6 +211,9 @@ void RegisterChromeWebUIConfigs() {
|
2024-11-14 17:07:03 -05:00
|
|
|
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
|
2024-08-26 12:44:25 +00:00
|
|
|
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
|
2024-10-24 11:05:31 -04:00
|
|
|
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
|
2024-08-26 12:44:25 +00:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ map.AddWebUIConfig(std::make_unique<ChromeUILicenseConfig>());
|
|
|
|
+#endif
|
2024-11-14 17:07:03 -05:00
|
|
|
map.AddWebUIConfig(std::make_unique<ChromeURLsUIConfig>());
|
|
|
|
map.AddWebUIConfig(std::make_unique<CrashesUIConfig>());
|
|
|
|
map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>());
|
2024-07-03 13:07:46 -04:00
|
|
|
diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc
|
2024-12-09 12:58:46 -05:00
|
|
|
index b04b8dc5c8781..f002f6178775e 100644
|
2024-07-03 13:07:46 -04:00
|
|
|
--- chrome/common/webui_url_constants.cc
|
|
|
|
+++ chrome/common/webui_url_constants.cc
|
2024-12-09 12:58:46 -05:00
|
|
|
@@ -96,6 +96,9 @@ base::span<const base::cstring_view> ChromeURLHosts() {
|
2024-07-29 13:09:20 -04:00
|
|
|
kChromeUIHistoryHost,
|
|
|
|
history_clusters_internals::kChromeUIHistoryClustersInternalsHost,
|
|
|
|
kChromeUIInterstitialHost,
|
2024-07-03 13:07:46 -04:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2024-07-29 13:09:20 -04:00
|
|
|
+ kChromeUILicenseHost,
|
2024-07-03 13:07:46 -04:00
|
|
|
+#endif
|
2024-07-29 13:09:20 -04:00
|
|
|
kChromeUILocalStateHost,
|
2024-07-03 13:07:46 -04:00
|
|
|
#if !BUILDFLAG(IS_ANDROID)
|
2024-07-29 13:09:20 -04:00
|
|
|
kChromeUIManagementHost,
|
2024-07-03 13:07:46 -04:00
|
|
|
diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h
|
2024-12-09 12:58:46 -05:00
|
|
|
index 5b811889ae545..a118638e7e629 100644
|
2024-07-03 13:07:46 -04:00
|
|
|
--- chrome/common/webui_url_constants.h
|
|
|
|
+++ chrome/common/webui_url_constants.h
|
2024-12-09 12:58:46 -05:00
|
|
|
@@ -17,6 +17,7 @@
|
|
|
|
#include "base/strings/cstring_view.h"
|
2024-07-03 13:07:46 -04:00
|
|
|
#include "build/branding_buildflags.h"
|
|
|
|
#include "build/build_config.h"
|
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
#include "chrome/common/buildflags.h"
|
2024-09-27 14:15:44 +00:00
|
|
|
#include "components/signin/public/base/signin_buildflags.h"
|
2024-12-09 12:58:46 -05:00
|
|
|
#include "content/public/common/url_constants.h"
|
|
|
|
@@ -145,6 +146,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
|
|
|
|
inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/";
|
|
|
|
inline constexpr char kChromeUIKillHost[] = "kill";
|
|
|
|
inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals";
|
2024-07-03 13:07:46 -04:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2024-07-29 13:09:20 -04:00
|
|
|
+inline constexpr char kChromeUILicenseHost[] = "license";
|
|
|
|
+inline constexpr char kChromeUILicenseURL[] = "chrome://license/";
|
2024-07-03 13:07:46 -04:00
|
|
|
+#endif
|
2024-07-29 13:09:20 -04:00
|
|
|
inline constexpr char kChromeUILocalStateHost[] = "local-state";
|
|
|
|
inline constexpr char kChromeUILocationInternalsHost[] = "location-internals";
|
|
|
|
inline constexpr char kChromeUIManagementHost[] = "management";
|