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

Unified Diff: ash/shell.cc

Issue 2852403002: Make virtual keyboard work on supervised user creation (Closed)
Patch Set: Fix ShellTest.KeyboardCreation. Created 3 years, 6 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 | « no previous file | ash/shell_unittest.cc » ('j') | 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 fdc5bff17f49f274f7a740f5bca8ececc8a56868..6c05ecc6534cd9f2d0189da8c53a77d9f2894dbd 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -1239,6 +1239,15 @@ void Shell::OnSessionStateChanged(session_manager::SessionState state) {
// multiple times (e.g. initial login vs. multiprofile add session).
if (state == session_manager::SessionState::ACTIVE) {
InitializeShelf();
+ }
+ // Recreates keyboard on user profile change, to refresh keyboard
+ // extensions with the new profile and the extensions call proper IME.
+ // |LOGGED_IN_NOT_ACTIVE| is needed so that the virtual keyboard works on
+ // supervised user creation. crbug.com/712873
+ // |ACTIVE| is also needed for guest user workflow.
+ if ((state == session_manager::SessionState::LOGGED_IN_NOT_ACTIVE ||
+ state == session_manager::SessionState::ACTIVE) &&
+ keyboard::IsKeyboardEnabled()) {
if (GetAshConfig() != Config::MASH) {
// Recreate the keyboard after initial login and after multiprofile login.
CreateKeyboard();
« no previous file with comments | « no previous file | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698