Fix system hotkeys like cmd+` in app shims.
SystemHotkeyHelperMac, which just managed a SystemHotkeyMap, was never initialized in app shim processes, and I didn't see a good place to initialize it because it's private to /content. This change replaces that class with a function that lazily constructs a SystemHotkeyMap. The SystemHotkeyMap is now created synchronously on first use instead of on a background thread ten seconds after startup. This gets rid of the time after startup where system hotkeys aren't respected and simplifies the code a bunch, but could jank the main thread if loading from disk is slow. I'd favor janking the main thread during the first keyboard shortcut instead of mis-routing it. Bug: 919579 Change-Id: I78ab8dfaf7b9115ce32e1d2d3e1c27abb7f6a9b5 Reviewed-on: https://chromium-review.googlesource.com/c/1446847Reviewed-by:Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org> Auto-Submit: Sidney San Martín <sdy@chromium.org> Cr-Commit-Position: refs/heads/master@{#629626}
Showing
Please register or sign in to comment