From fc7615eaaeb198150bba8c2c2f5ba63f04220276 Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Fri, 29 Dec 2023 07:30:08 -0600 Subject: [PATCH] add disable aero .cc file --- infra/THORIUM_DEV_BOOKMARKS.html | 1 + src/chrome/browser/themes/theme_helper_win.cc | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/chrome/browser/themes/theme_helper_win.cc diff --git a/infra/THORIUM_DEV_BOOKMARKS.html b/infra/THORIUM_DEV_BOOKMARKS.html index 36b50d1c..3004c158 100644 --- a/infra/THORIUM_DEV_BOOKMARKS.html +++ b/infra/THORIUM_DEV_BOOKMARKS.html @@ -207,6 +207,7 @@
new_tab_page_feed_v2_expandable_header.xml - Chromium Code Search
new_tab_page_multi_feed_header.xml - Chromium Code Search
pref_names.cc - Chromium Code Search +
theme_helper_win.cc - Chromium Code Search

Chromium Code Search
overlay-amd64-generic - Chromium Code Search diff --git a/src/chrome/browser/themes/theme_helper_win.cc b/src/chrome/browser/themes/theme_helper_win.cc new file mode 100644 index 00000000..16d0f092 --- /dev/null +++ b/src/chrome/browser/themes/theme_helper_win.cc @@ -0,0 +1,24 @@ +// Copyright 2023 The Chromium Authors and Alex313031 +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/themes/theme_helper_win.h" + +#include "base/command_line.h" +#include "chrome/browser/themes/custom_theme_supplier.h" +#include "chrome/browser/themes/theme_properties.h" +#include "chrome/browser/win/titlebar_config.h" +#include "chrome/grit/theme_resources.h" + +int ThemeHelperWin::GetDefaultDisplayProperty(int id) const { + if (id == ThemeProperties::SHOULD_FILL_BACKGROUND_TAB_COLOR) { + return !ShouldDefaultThemeUseMicaTitlebar(); + } + + return ThemeHelper::GetDefaultDisplayProperty(id); +} + +bool ThemeHelperWin::ShouldUseNativeFrame( + const CustomThemeSupplier* theme_supplier) const { + return !base::CommandLine::ForCurrentProcess()->HasSwitch("disable-aero"); +}