Clean up obsolete base::Feature "ImmersiveFullscreenTabs"
Minor
Commit Hash:
777fab94c0c336e1323093b0487ab24a620b757d
Commit Time: 2025-04-29 19:14:28+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review:
View Upstream Review 🔗
📋 Summary
This submission primarily cleans up the obsolete feature flag
kImmersiveFullscreenTabs. Specific changes include: removing the definition and declaration of the kImmersiveFullscreenTabs feature flag in chrome_features.cc and chrome_features.h; simplifying the logic of the UsesImmersiveFullscreenTabbedMode() method in browser_view.cc and browser_view.h by removing the check for kImmersiveFullscreenTabs, now relying solely on the kImmersiveFullscreen feature flag; updating the comment for the IsTabbed() method in immersive_mode_controller_cocoa.h within the Remote Cocoa component; and simplifying the parameter comment for the EnableImmersiveFullscreen method in native_widget_ns_window.mojom. This is a code health improvement that removes a no-longer-used feature flag.
🎯 Impact Analysis
The impact of this change on WebView2Mac is relatively minor, but attention should be paid to the following aspects: 1) **API Simplification**: With the removal of the
kImmersiveFullscreenTabs feature flag, the logic for enabling immersive fullscreen mode is simplified and now relies solely on the kImmersiveFullscreen flag. For WebView2Mac, if its downstream implementation references kImmersiveFullscreenTabs, corresponding adjustments are required. 2) **Remote Cocoa Interface Changes**: Although the signature of the EnableImmersiveFullscreen method remains unchanged, the semantics of its parameter tab_widget_id have shifted from "provided when the ImmersiveFullscreenTabs feature is enabled" to "holding the ID of the tab-hosting widget." This indicates that the parameter is now a regular parameter rather than a conditional one. 3) **Consistent Feature Behavior**: Since kImmersiveFullscreenTabs was previously enabled by default, removing this flag should not alter feature behavior, and tabbed immersive fullscreen mode will continue to be supported. 4) **WebView2Mac Compatibility**: WebView2Mac relies on immersive fullscreen support provided by Remote Cocoa. This change simplifies the logic for checking feature flags, which benefits code maintenance and should not affect the core functionality of WebView2Mac.
Impacted Classes:
ImmersiveModeControllerCocoa
ImmersiveModeTabbedControllerCocoa
NativeWidgetNSWindow