mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Delete Alloy bootstrap (fixes #3685)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user