Revert MockActivationController widget activation emulation in tests
Minor
提交哈希:
3be941b09e163f3fac88b833bd5fb315de9101b3
提交时间: 2026-02-25 04:38:52
影响等级: Minor
生成工具: webview2-upstream-sentry
上游审核链接:
查看上游审核 🔗
📋 摘要
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.
🎯 影响分析
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.
受影响的类:
views::NativeWidgetMacNSWindowHost