Add GN arg to disable Alloy bootstrap (see #3681, see #3685)

Set enable_alloy_bootstrap=false to build with Alloy bootstrap code
removed. Extension API is documented as deprecated in comments but
not compiled out with this arg.
This commit is contained in:
Marshall Greenblatt
2024-04-29 21:09:17 -04:00
parent d666ec5770
commit b5d84c254d
96 changed files with 1243 additions and 516 deletions

View File

@@ -4,8 +4,6 @@
#include "libcef/common/net/scheme_registration.h"
#include "libcef/common/app_manager.h"
#include "libcef/common/net/scheme_info.h"
#include "libcef/features/runtime.h"
#include "base/containers/contains.h"
@@ -14,8 +12,14 @@
#include "url/url_constants.h"
#include "url/url_util.h"
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
#include "libcef/common/app_manager.h"
#include "libcef/common/net/scheme_info.h"
#endif
namespace scheme {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
if (!cef::IsAlloyRuntimeEnabled()) {
return;
@@ -60,6 +64,7 @@ void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
CefAppManager::Get()->AddCustomScheme(&scheme);
}
}
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
bool IsInternalHandledScheme(const std::string& scheme) {
static const char* schemes[] = {