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

@@ -6,16 +6,21 @@
#define CEF_LIBCEF_BROWSER_PREFS_RENDERER_PREFS_H_
#pragma once
#include <string>
#include "include/internal/cef_types_wrappers.h"
#include "third_party/skia/include/core/SkColor.h"
#include "cef/libcef/features/features.h"
class CommandLinePrefStore;
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
#include "third_party/skia/include/core/SkColor.h"
#endif
namespace blink::web_pref {
struct WebPreferences;
}
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
namespace content {
class RenderViewHost;
class WebContents;
@@ -25,8 +30,12 @@ namespace user_prefs {
class PrefRegistrySyncable;
}
class CommandLinePrefStore;
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
namespace renderer_prefs {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
// Register additional renderer-related preferences.
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale);
@@ -35,6 +44,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
// available via the PrefService. Chromium command-line flags should not exist
// for these preferences.
void SetCommandLinePrefDefaults(CommandLinePrefStore* prefs);
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
// Set default values based on CEF command-line flags for preferences that are
// not available via the PrefService. Chromium command-line flags should not
@@ -45,6 +55,7 @@ void SetDefaultPrefs(blink::web_pref::WebPreferences& web);
void SetCefPrefs(const CefBrowserSettings& cef,
blink::web_pref::WebPreferences& web);
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
// Populate WebPreferences based on a combination of command-line values,
// PrefService and CefBrowserSettings.
void PopulateWebPreferences(content::RenderViewHost* rvh,
@@ -53,6 +64,7 @@ void PopulateWebPreferences(content::RenderViewHost* rvh,
bool PopulateWebPreferencesAfterNavigation(
content::WebContents* web_contents,
blink::web_pref::WebPreferences& web);
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
} // namespace renderer_prefs