RemoteMacViews: Generalize remote accessibility focus override
Move ScopedAccessibilityFocus from ui/views/cocoa to ui/base/cocoa,
because it is going to be used by content/ (which, for the moment,
does not depends on ui/views, though I would like to add an explicit
dependency at some point).
Rename ScopedAccessibilityFocus to AccessibilityFocusOverrider, and
- make it track
- whether or not the view it represents if the first responder for
its window
- whether or not its window is key
- override -[NSApplication accessibilityFocusedUIElement] only when
both of those conditions are true
Apply this scheme to the two main NSViews
- BridgedContentView uses an AccessibilityFocusOverrider in
BridgedNativeWidgetHostImpl
- RenderWidgetHostViewCocoa uses an AccessibilityFocusOverrider in
RenderWidgetHostViewMac
Change slightly the way that NSWindow key status is tracked between
RenderWidgetHostViewCocoa/Mac.
- These changes were only send to the browser when the view was also
first responder
- Change this to always send changes in key status, and early-out
when the view is not first responder on the browser side.
Bug: 900846
Change-Id: I15bb144ae4570eeffa51c4609f58aa8b58b892d9
Reviewed-on: https://chromium-review.googlesource.com/c/1345121Reviewed-by:
Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610209}
Showing
Please register or sign in to comment