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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/shell_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 aura::Window* lost_active) { 1232 aura::Window* lost_active) {
1233 if (gained_active) 1233 if (gained_active)
1234 root_window_for_new_windows_ = gained_active->GetRootWindow(); 1234 root_window_for_new_windows_ = gained_active->GetRootWindow();
1235 } 1235 }
1236 1236
1237 void Shell::OnSessionStateChanged(session_manager::SessionState state) { 1237 void Shell::OnSessionStateChanged(session_manager::SessionState state) {
1238 // Initialize the shelf when a session becomes active. It's safe to do this 1238 // Initialize the shelf when a session becomes active. It's safe to do this
1239 // multiple times (e.g. initial login vs. multiprofile add session). 1239 // multiple times (e.g. initial login vs. multiprofile add session).
1240 if (state == session_manager::SessionState::ACTIVE) { 1240 if (state == session_manager::SessionState::ACTIVE) {
1241 InitializeShelf(); 1241 InitializeShelf();
1242 }
1243 // Recreates keyboard on user profile change, to refresh keyboard
1244 // extensions with the new profile and the extensions call proper IME.
1245 // |LOGGED_IN_NOT_ACTIVE| is needed so that the virtual keyboard works on
1246 // supervised user creation. crbug.com/712873
1247 // |ACTIVE| is also needed for guest user workflow.
1248 if ((state == session_manager::SessionState::LOGGED_IN_NOT_ACTIVE ||
1249 state == session_manager::SessionState::ACTIVE) &&
1250 keyboard::IsKeyboardEnabled()) {
1242 if (GetAshConfig() != Config::MASH) { 1251 if (GetAshConfig() != Config::MASH) {
1243 // Recreate the keyboard after initial login and after multiprofile login. 1252 // Recreate the keyboard after initial login and after multiprofile login.
1244 CreateKeyboard(); 1253 CreateKeyboard();
1245 } 1254 }
1246 } 1255 }
1247 } 1256 }
1248 1257
1249 void Shell::OnLoginStatusChanged(LoginStatus login_status) { 1258 void Shell::OnLoginStatusChanged(LoginStatus login_status) {
1250 UpdateAfterLoginStatusChange(login_status); 1259 UpdateAfterLoginStatusChange(login_status);
1251 } 1260 }
(...skipping 29 matching lines...) Expand all
1281 void Shell::OnPrefServiceInitialized( 1290 void Shell::OnPrefServiceInitialized(
1282 std::unique_ptr<::PrefService> pref_service) { 1291 std::unique_ptr<::PrefService> pref_service) {
1283 if (!instance_) 1292 if (!instance_)
1284 return; 1293 return;
1285 // |pref_service_| is null if can't connect to Chrome (as happens when 1294 // |pref_service_| is null if can't connect to Chrome (as happens when
1286 // running mash outside of chrome --mash and chrome isn't built). 1295 // running mash outside of chrome --mash and chrome isn't built).
1287 pref_service_ = std::move(pref_service); 1296 pref_service_ = std::move(pref_service);
1288 } 1297 }
1289 1298
1290 } // namespace ash 1299 } // namespace ash
OLDNEW
« 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