mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			130 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			130 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| 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 =
 | |
| +        "<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 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 acc4db4ef254f..18a764bf77ee0 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"
 | |
| @@ -205,6 +206,9 @@ void RegisterChromeWebUIConfigs() {
 | |
|    map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
 | |
|    map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
 | |
|    map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
 | |
| +#if BUILDFLAG(ENABLE_CEF)
 | |
| +  map.AddWebUIConfig(std::make_unique<ChromeUILicenseConfig>());
 | |
| +#endif
 | |
|    map.AddWebUIConfig(std::make_unique<ChromeURLsUIConfig>());
 | |
|    map.AddWebUIConfig(std::make_unique<CrashesUIConfig>());
 | |
|    map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>());
 | |
| 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<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 ff691df3c5a0e..f4ab7030e9908 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"
 | |
| @@ -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";
 | |
| +#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";
 |