Resolvesbrave/brave-browser#53601
Enables macOS immersive fullscreen (auto-hiding toolbar on hover) for the browser
when horizontal tabs are in use. When vertical tabs are active, immersive fullscreen
is disabled and the browser falls back to standard fullscreen behavior. Additionally,
switching to vertical tab mode is blocked while the browser is in fullscreen.
Immersive fullscreen and vertical tab mode both use their own separate widgets for
hosting the tab strip, which means both refer to the same tab strip simultaneously.
This conflict requires more work to resolve properly, so immersive fullscreen is
disabled when vertical tabs are active for now.
IDC_TOGGLE_VERTICAL_TABS command enabled state is used as the single source of truth
for whether the vertical tabs toggle is available. BraveBrowserCommandController
overrides UpdateCommandsForFullscreenMode() to disable this command on macOS when
entering fullscreen. All surfaces — ToggleVerticalTabStrip(), the tab strip context
menu, the system menu, IsVerticalTabToggleEnabled(), and the settings page — derive
their state from this command rather than querying fullscreen state independently.
BraveAppearanceHandler implements CommandObserver to watch IDC_TOGGLE_VERTICAL_TABS
and push state changes to the settings UI via a WebUI event.
TEST=BraveBrowserCommandControllerTest.VerticalTabToggleEnabledState
Co-authored-by: Sangwoo Ko <sangwoo108@gmail.com>