alloy: Fix incorrect rendering of PiP overlay on mouseover (fixes #3482)

Initialize the Chrome color mixer so that ColorProvider returns the expected
semi-transparent color for overlay background in video_overlay_window_views.cc
instead of the default opaque red color (kPlaceholderColor).
This commit is contained in:
Marshall Greenblatt 2023-04-11 14:08:21 -04:00
parent 4b3c3132cb
commit 2094a8e221
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/media/router/chrome_media_router_factory.h"
#include "chrome/browser/net/system_network_context_manager.h"
#include "chrome/browser/ui/color/chrome_color_mixers.h"
#include "chrome/browser/ui/javascript_dialogs/chrome_javascript_app_modal_dialog_view_factory.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/chrome_switches.h"
@ -187,6 +188,11 @@ void AlloyBrowserMainParts::ToolkitInitialized() {
#else
InstallChromeJavaScriptAppModalDialogViewFactory();
#endif
// On GTK that builds the native theme that, in turn, adds the GTK core color
// mixer; core mixers should all be added before we add chrome mixers.
ui::ColorProviderManager::Get().AppendColorProviderInitializer(
base::BindRepeating(AddChromeColorMixers));
}
void AlloyBrowserMainParts::PreCreateMainMessageLoop() {