alloy: Fix theme configuration on startup (fixes issue #3449)

This commit is contained in:
Marshall Greenblatt 2023-02-22 17:10:25 -05:00
parent 16a215353c
commit fde72b57a8
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@
#include "net/base/net_module.h"
#include "third_party/widevine/cdm/buildflags.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/native_theme/native_theme.h"
#if BUILDFLAG(IS_LINUX)
#include "ui/ozone/buildflags.h"
@ -308,6 +309,9 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() {
file_dialog_runner::RegisterFactory();
permission_prompt::RegisterCreateCallback();
// Initialize theme configuration (high contrast, dark mode, etc).
ui::NativeTheme::GetInstanceForNativeUi();
#if BUILDFLAG(ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM) || \
BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
const base::CommandLine* command_line =