This commit is contained in:
Alexander Frick 2024-02-28 00:30:17 -06:00
parent bd346e4c5d
commit 11bcd8b88e
9 changed files with 20 additions and 21 deletions

View file

@ -57,10 +57,10 @@
kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)},
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
{"middle-button-autoscroll",
{"middle-click-autoscroll",
"Middle Button Autoscroll",
"Enables autoscrolling when the middle mouse button is pressed.",
kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kMiddleButtonClickAutoscroll)},
kOsDesktop, SINGLE_VALUE_TYPE("middle-click-autoscroll")},
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
{"autoplay-policy",

View file

@ -151,11 +151,13 @@ void BrowserAppMenuButton::UpdateThemeBasedState() {
}
void BrowserAppMenuButton::UpdateIcon() {
static const bool disable_thorium_icons =
base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons");
const gfx::VectorIcon& icon =
ui::TouchUiController::Get()->touch_ui()
? kBrowserToolsTouchIcon
: (features::IsChromeRefresh2023() ? kBrowserToolsChromeRefreshIcon
: base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons") ? kBrowserToolsIcon
: disable_thorium_icons ? kBrowserToolsIcon
: kBrowserToolsThoriumIcon);
for (auto state : kButtonStates) {
// `app_menu_icon_controller()->GetIconColor()` set different colors based

View file

@ -32,9 +32,11 @@ ChromeLabsButton::ChromeLabsButton(BrowserView* browser_view,
base::Unretained(this))),
browser_view_(browser_view),
model_(model) {
static const bool disable_thorium_icons =
base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons");
SetProperty(views::kElementIdentifierKey, kToolbarChromeLabsButtonElementId);
SetVectorIcons(features::IsChromeRefresh2023() ? kChromeLabsChromeRefreshIcon
: base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons") ? kChromeLabsIcon
: disable_thorium_icons ? kChromeLabsIcon
: kChromeLabsThoriumIcon,
kChromeLabsTouchIcon);
SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_CHROMELABS_BUTTON));

View file

@ -132,12 +132,14 @@ HomeButton::HomeButton(PressedCallback callback, PrefService* prefs)
: ToolbarButton(std::move(callback)),
prefs_(prefs),
coordinator_(this, prefs) {
static const bool disable_thorium_icons =
base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons");
SetProperty(views::kElementIdentifierKey, kToolbarHomeButtonElementId);
SetTriggerableEventFlags(ui::EF_LEFT_MOUSE_BUTTON |
ui::EF_MIDDLE_MOUSE_BUTTON);
SetVectorIcons(features::IsChromeRefresh2023()
? kNavigateHomeChromeRefreshIcon
: base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons") ? kNavigateHomeIcon
: disable_thorium_icons ? kNavigateHomeIcon
: kNavigateHomeThoriumIcon,
kNavigateHomeTouchIcon);
SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_HOME));

View file

@ -32,6 +32,9 @@
// ReloadButton ---------------------------------------------------------------
static const bool disable_thorium_icons =
base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons");
ReloadButton::ReloadButton(CommandUpdater* command_updater)
: ToolbarButton(base::BindRepeating(&ReloadButton::ButtonPressed,
base::Unretained(this)),
@ -40,7 +43,7 @@ ReloadButton::ReloadButton(CommandUpdater* command_updater)
command_updater_(command_updater),
reload_icon_(features::IsChromeRefresh2023()
? vector_icons::kReloadChromeRefreshIcon
: base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons") ? vector_icons::kReloadIcon
: disable_thorium_icons ? vector_icons::kReloadIcon
: vector_icons::kReloadThoriumIcon),
reload_touch_icon_(kReloadTouchIcon),
stop_icon_(features::IsChromeRefresh2023()

View file

@ -63,7 +63,9 @@ void SidePanelToolbarButton::ButtonPressed() {
void SidePanelToolbarButton::UpdateToolbarButtonIcon() {
const bool is_right_aligned = browser_->profile()->GetPrefs()->GetBoolean(
prefs::kSidePanelHorizontalAlignment);
if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons")) {
static const bool disable_thorium_icons =
base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons");
if (disable_thorium_icons) {
if (is_right_aligned) {
SetVectorIcons(features::IsChromeRefresh2023() ? kSidePanelChromeRefreshIcon
: kSidePanelIcon, kSidePanelTouchIcon);

View file

@ -10,7 +10,6 @@
#define FPL FILE_PATH_LITERAL
#if BUILDFLAG(IS_MAC)
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#define PRODUCT_STRING "Google Chrome"
#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING)
@ -20,20 +19,9 @@
#else
#error Unknown branding
#endif
#endif // BUILDFLAG(IS_MAC)
namespace chrome {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#define PRODUCT_STRING "Google Chrome"
#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING)
#define PRODUCT_STRING "Google Chrome for Testing"
#elif BUILDFLAG(CHROMIUM_BRANDING)
#define PRODUCT_STRING "Thorium"
#else
#error Unknown branding
#endif
const char kChromeVersion[] = CHROME_VERSION_STRING;
const char kBrandName[] = PRODUCT_STRING;

View file

@ -73,7 +73,7 @@ declare_args() {
# Enables AC4 audio handling in chromium. This includes demuxing,
# on-device decoding and bitstream passthrough as supported by device.
enable_platform_ac4_audio = proprietary_codecs
enable_platform_ac4_audio = false
enable_platform_mpeg_h_audio = proprietary_codecs

@ -1 +1 @@
Subproject commit 3bee914f5829699419b19e59b975ef4dacca7beb
Subproject commit 0d06516e487e52fc397bbfe80da8002dde2dc702