• Joe Downing's avatar
    Pause UserInputMonitor when KeyboardLock is engaged · 21f0afcd
    Joe Downing authored
    This CL addresses an issue where KeyboardLock stops working (on
    Windows) when the microphone permission is granted.  I tracked this
    down to the RawInput key handler created by the UserInputMonitor
    instance used in the audio pipeline (for keypress noise
    cancellation).  After discussing this with the audio team last year,
    we decided to pause the UserInputMonitor when keyboard lock is
    engaged (and resumed when keyboard lock is disengaged).
    
    In order for the UserInputMonitor to know when the keyboard hook has
    been engaged, I've added a KeyboardHookMonitor class that the keyboard
    hook impl can use to notify observers of keyboard hook status changes.
    
    Change-Id: Ib8a51a0a49d33c6989c9325739d071c26860f98d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615666Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Commit-Queue: Joe Downing <joedow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#843142}
    21f0afcd
keyboard_hook_observer.h 877 Bytes