MacViews: Move focus logic to NativeWidgetMac
The logic to add FocusManager observers was smeared across NativeWidgetMac and NativeWidgetMacNSWindowHost. Change this so that all of the logic is in NativeWidgetMac::SetFocusManager. In the process, cut-and-paste a handful of functionality over to NativeWidgetMac. This is part of the larger trend of merging NativeWidgetMac and NativeWidgetMacNSWindowHost (preserving the latter perhaps, only as mojo-implementing friend). The motivation for this is that, when reparenting a non-top-level NativeWidgetMac, we do not move the FocusManager observers, which causes ConstrainedWindowViewTest.TabMoveTest to crash. This patch should have no functional change. The next patch in the sequence will update the observers as needed. Bug: 957362 Change-Id: Id5a1d6183e446df647fa877239cb9dfb549e18a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1983343Reviewed-by:Leonard Grey <lgrey@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#727645}
Showing
Please register or sign in to comment