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

Unified Diff: ash/shell.cc

Issue 2852403002: Make virtual keyboard work on supervised user creation (Closed)
Patch Set: nit. Restore DCHECK and updated comment. 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 | « ash/shell.h ('k') | ash/shell_unittest.cc » ('j') | ash/test/ash_test_base.cc » ('J')
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 b9d4e76195be1e4c8e1880c39ea16594eebd751b..2021fcd77ac570409d17afed707f0a58fdbcd984 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -1217,6 +1217,16 @@ 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() &&
+ !keyboard::KeyboardController::GetInstance()) {
if (GetAshConfig() != Config::MASH) {
// Recreate the keyboard after initial login and after multiprofile login.
CreateKeyboard();
« no previous file with comments | « ash/shell.h ('k') | ash/shell_unittest.cc » ('j') | ash/test/ash_test_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698