Revert MockActivationController widget activation emulation in tests
Minor
Commit Hash:
3be941b09e163f3fac88b833bd5fb315de9101b3
Commit Time: 2026-02-25 04:38:52
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review:
View Upstream Review 🔗
📋 Summary
This commit reverts the previously introduced MockActivationController class and its associated WidgetActivationDelegate infrastructure. The reverted code was used to emulate widget activation behavior in tests but caused GlicInstanceCoordinatorBrowserTest failures. The revert includes: removing ui/views/widget/widget_activation_delegate.h/.cc and ui/views/test/mock_activation_controller.h/.cc files; restoring NativeWidgetMacNSWindowHost::IsWindowKey() from a method that queried WidgetActivationDelegate back to an inline function directly returning the is_window_key_ member; removing WidgetActivationDelegate references from desktop_window_tree_host_platform.cc and desktop_window_tree_host_win.cc; simplifying glic_test_util test utility code.
🎯 Impact Analysis
This change has minimal impact on WebView2Mac. The main modification restores NativeWidgetMacNSWindowHost::IsWindowKey() from a non-inline method with WidgetActivationDelegate query logic back to an inline function directly returning is_window_key_. This is a pure test infrastructure revert that does not affect production window activation behavior — IsWindowKey() already returned is_window_key_ in production since WidgetActivationDelegate was only set during tests. Edge downstream has no references to IsWindowKey, WidgetActivationDelegate, or MockActivationController in edge_embedded_browser/ or components/edge_webview2/. No downstream patch is needed.
Impacted Classes:
views::NativeWidgetMacNSWindowHost