Chromium Code Reviews| Index: ash/shell.cc |
| diff --git a/ash/shell.cc b/ash/shell.cc |
| index 8cdfec9c861977a5c88ca323d51d7546de3f1125..4c77fe9f9ebcf45c53f2ab0a81fbdeb4b1f03f07 100644 |
| --- a/ash/shell.cc |
| +++ b/ash/shell.cc |
| @@ -1215,12 +1215,23 @@ void Shell::OnSessionStateChanged(session_manager::SessionState state) { |
| // multiple times (e.g. initial login vs. multiprofile add session). |
| if (state == session_manager::SessionState::ACTIVE) { |
| CreateShelfView(); |
| + } |
| + // The keyboard is recreated on user profile change, so to refresh keyboard |
| + // extensions with the new profile and proper IME engine is called from them. |
| + // |LOGGED_IN_NOT_ACTIVE| is needed so that the virtual keyboard works on |
| + // supervised user creation. crbug.com/712873 |
| + // The previous state is checked to avoid needless |CreateKeyboard| call. |
| + if ((state == session_manager::SessionState::LOGGED_IN_NOT_ACTIVE || |
| + state == session_manager::SessionState::ACTIVE) && |
| + !(previous_state_ == |
| + session_manager::SessionState::LOGGED_IN_NOT_ACTIVE || |
| + previous_state_ == session_manager::SessionState::ACTIVE)) { |
|
xiyuan
2017/05/12 17:30:03
How about using KeyboardController::GetInstance()
oka
2017/06/07 12:42:37
Updated.
|
| if (GetAshConfig() != Config::MASH) { |
|
Alexander Alekseev
2017/05/12 04:05:21
Did you verify that multiprofile mode works with t
oka
2017/06/07 12:42:37
I manually confirmed keyboard works after multipro
|
| - // Recreate the keyboard after initial login and after multiprofile login. |
| CreateKeyboard(); |
| } |
| } |
| + previous_state_ = state; |
| } |
| void Shell::OnLoginStatusChanged(LoginStatus login_status) { |