Revert MockActivationController widget activation emulation in tests (first revert)

Commit: ca260c6e | 2026-02-24 20:06:28

← Back to List

Revert MockActivationController widget activation emulation in tests (first revert)

Minor
Commit Hash: ca260c6ee8ab166d99d9d20635914db15f490565
Commit Time: 2026-02-24 20:06:28
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review: View Upstream Review 🔗

📋 Summary

This commit reverts the MockActivationController class and WidgetActivationDelegate infrastructure introduced in f92674ca, due to likely causing numerous test failures around glic window activation (crbug.com/487109869). The revert content is identical to 3be941b0: removes widget_activation_delegate.h/.cc and mock_activation_controller.h/.cc files; restores NativeWidgetMacNSWindowHost::IsWindowKey() to an inline function directly returning is_window_key_; removes WidgetActivationDelegate references from desktop_window_tree_host_platform.cc and desktop_window_tree_host_win.cc; simplifies glic_test_util. Note: this revert was subsequently relanded by 8a2462b4, which was then reverted again by 3be941b0.

🎯 Impact Analysis

This change has minimal impact on WebView2Mac. Same as 3be941b0, the main modification restores NativeWidgetMacNSWindowHost::IsWindowKey() from a 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. 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