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

@@ -21,7 +21,6 @@
#include "cef/libcef/browser/image_impl.h"
#include "cef/libcef/browser/views/widget.h"
#include "cef/libcef/browser/views/window_impl.h"
#include "cef/libcef/features/runtime.h"
#include "ui/base/hit_test.h"
#include "ui/display/screen.h"
#include "ui/views/widget/widget.h"
@@ -357,36 +356,15 @@ void UpdateModalDialogPosition(views::Widget* widget,
}
bool ComputeAlloyStyle(CefWindowDelegate* cef_delegate) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
const bool supports_chrome_style = cef::IsChromeRuntimeEnabled();
const auto default_style = cef::IsAlloyRuntimeEnabled()
? CEF_RUNTIME_STYLE_ALLOY
: CEF_RUNTIME_STYLE_CHROME;
#else
const auto default_style = CEF_RUNTIME_STYLE_CHROME;
#endif
auto result_style = default_style;
if (cef_delegate) {
auto requested_style = cef_delegate->GetWindowRuntimeStyle();
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
if (requested_style == CEF_RUNTIME_STYLE_ALLOY) {
// Alloy style is always supported.
result_style = requested_style;
} else if (requested_style == CEF_RUNTIME_STYLE_CHROME) {
if (supports_chrome_style) {
result_style = requested_style;
} else {
LOG(ERROR) << "GetWindowRuntimeStyle() requested Chrome style; only "
"Alloy style is supported";
}
}
#else
if (requested_style != CEF_RUNTIME_STYLE_DEFAULT) {
result_style = requested_style;
}
#endif
}
return result_style == CEF_RUNTIME_STYLE_ALLOY;