Delete Alloy bootstrap (fixes #3685)

This commit is contained in:
Marshall Greenblatt
2024-06-25 20:12:37 -04:00
parent b95b3e6fd5
commit a461a89728
282 changed files with 360 additions and 22399 deletions

View File

@@ -1,42 +1,19 @@
#include "cef/libcef/common/resource_bundle_delegate.h"
#include "cef/libcef/common/app_manager.h"
#include "cef/libcef/features/runtime.h"
CefResourceBundleDelegate::CefResourceBundleDelegate() {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
// Alloy bootstrap explicitly enables pack file loading in
// AlloyMainDelegate::InitializeResourceBundle, and it is otherwise disabled
// by default. Chrome bootstrap does not support this.
allow_pack_file_load_ = cef::IsChromeRuntimeEnabled();
#endif
}
CefResourceBundleDelegate::CefResourceBundleDelegate() = default;
base::FilePath CefResourceBundleDelegate::GetPathForResourcePack(
const base::FilePath& pack_path,
ui::ResourceScaleFactor scale_factor) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
// Only allow the cef pack file to load.
if (!pack_loading_disabled_ && allow_pack_file_load_) {
return pack_path;
}
return base::FilePath();
#else
return pack_path;
#endif
}
base::FilePath CefResourceBundleDelegate::GetPathForLocalePack(
const base::FilePath& pack_path,
const std::string& locale) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
if (!pack_loading_disabled_) {
return pack_path;
}
return base::FilePath();
#else
return pack_path;
#endif
}
gfx::Image CefResourceBundleDelegate::GetImageNamed(int resource_id) {
@@ -81,12 +58,6 @@ bool CefResourceBundleDelegate::GetRawDataResource(
}
}
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
if (pack_loading_disabled_) {
return true;
}
#endif
return !value->empty();
}
@@ -105,11 +76,5 @@ bool CefResourceBundleDelegate::GetLocalizedString(
}
}
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
if (pack_loading_disabled_) {
return true;
}
#endif
return !value->empty();
}