• mohsen's avatar
    Remove MenuMessagePumpDispatcher · 0df58371
    mohsen authored
    MenuMessagePumpDispatcher is used on Windows to handle keyboard events
    and some other events in menu message loops. In order to have fully
    async menus, we need to get rid of it. Instead, we can use
    MenuKeyEventHandler which is used on Chrome OS and Linux with some
    modifications. Following are messages that are handled in
    MenuMessagePumpDispatcher and how they can be handled after removing
    this class:
    
     - WM_KEYDOWN: This will be handled in MenuKeyEventHandler::OnKeyEvent.
    
     - WM_CHAR: This is used to handle "translated" characters for mnemonics
       according to the active keyboard layout. We can achieve this in
       MenuKeyEventHandler by using event->GetCharacter() instead of
       ui::DomCodeToUsLayoutCharacter().
    
     - WM_SYSKEYDOWN: This happens when Alt or F10 keys are pressed
       (according to MSDN). We can handle these keys in MenuKeyEventHandler.
    
     - WM_CANCELMODE: This is already handled in
       ActivationChangeObserverImpl::OnCancelMode() which is used in
       MenuMessageLoopAura.
    
    BUG=564255,566019
    
    Review URL: https://codereview.chromium.org/1625313002
    
    Cr-Commit-Position: refs/heads/master@{#371894}
    0df58371
menu_controller.h 26.5 KB