mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-20 22:20:41 +01:00
110 lines
4.3 KiB
Diff
110 lines
4.3 KiB
Diff
diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc
|
|
index 93efcb5a7edc0..f1cb0c791adf6 100644
|
|
--- chrome/browser/ui/webui/about/about_ui.cc
|
|
+++ chrome/browser/ui/webui/about/about_ui.cc
|
|
@@ -35,6 +35,7 @@
|
|
#include "base/values.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/browser_process.h"
|
|
#include "chrome/browser/profiles/profile.h"
|
|
@@ -92,6 +93,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 {
|
|
@@ -695,6 +700,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/chrome_web_ui_controller_factory.cc chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
index 39e7681c0c708..95c3f21fc22b4 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"
|
|
@@ -385,6 +386,9 @@ bool IsAboutUI(const GURL& url) {
|
|
|| url.host_piece() == chrome::kChromeUIOSCreditsHost ||
|
|
url.host_piece() == chrome::kChromeUIBorealisCreditsHost ||
|
|
url.host_piece() == chrome::kChromeUICrostiniCreditsHost
|
|
+#endif
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
+ || url.host_piece() == chrome::kChromeUILicenseHost
|
|
#endif
|
|
); // NOLINT
|
|
}
|
|
@@ -1000,6 +1004,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 70e366e816db5..87ec49d6b6636 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 "content/public/common/url_constants.h"
|
|
@@ -155,6 +156,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";
|