Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1349)

Unified Diff: ash/shell.cc

Issue 2852403002: Make virtual keyboard work on supervised user creation (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ash/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698