• Yuichiro Hanada's avatar
    Migrate EventRewriterChromeOS to new API (5/n). · a3d2c434
    Yuichiro Hanada authored
    This CL changes RewriteKeyEventInContext to use the new API.
    Before this CL, EventRewriterChromeOS::NextDispatchEvent sends the
    events from StickyKeysControllers and the events generated in
    RewriteKeyEventInContext. Now, RewriteKeyEventInContext takes
    Continuation as an argument and sends all generated events without
    storing them in dispatched_key_events_ and gets events from
    StickyKeysController if it has pending events.
    As the result, we can remove dispatched_key_events_ field and
    EventRewriterChromeOS::NextDispatchEvent.
    However, EventRewriteStatus is still used inside EventRewriterChromeOS,
    so we can't clean up them yet.
    
    Bug: 1049489
    Test: unit_tests
    Change-Id: I41109afa57bc1407beab6ab264bcbfc992d9f1ef
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2056526
    Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
    Reviewed-by: default avatarMitsuru Oshima (OOO) <oshima@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#743440}
    a3d2c434
event_rewriter_chromeos.cc 70.3 KB