• oka's avatar
    Make virtual keyboard work on supervised user creation · c21941d2
    oka authored
    Keyboard should be recreated with Shell::CreateKeyboard per user sign
    in/out so to associate the new user to keyboard extensions. If the
    keyboard extensions were associated with the previous user, it in turn
    associated with an inactive IME and thus chrome.input.ime.sendKeyEvents
    does nothing.
    
    Currently the keyboard is recreated in Shell::OnSessionStateChanged when
    the session state becomes ACTIVE. However, on the supervised user
    creation window, the session state is not ACTIVE, but
    LOGGED_IN_NOT_ACTIVE, which represents the state where the user
    has signed in but the login UI is not hidden yet.
    That's why virtual keyboard was not working there.
    
    This CL fixes the issue by recreating the keyboard on LOGGED_IN_NOT_ACTIVE
    too.
    
    BUG=712873
    TEST=Added unit test. Manually tested VK works:
    - on supervised user creation window
    - after multiprofile switch
    
    Review-Url: https://codereview.chromium.org/2852403002
    Cr-Commit-Position: refs/heads/master@{#480878}
    c21941d2
shell_unittest.cc 19.4 KB