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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 1578133003: Supports setting non-login input methods in VPD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests. Created 4 years, 11 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 | « chrome/browser/chromeos/input_method/input_method_util_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 072015cb3a6e4f258a9d6bd3e9363a225fe31200..bd11287b27332481a9ea52904ace8ac1ad94d3d8 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -176,6 +176,18 @@ void InitLocaleAndInputMethodsForNewUser(
if (preferred_input_method.id().empty()) {
preferred_input_method =
session_manager->GetDefaultIMEState(profile)->GetCurrentInputMethod();
+ const input_method::InputMethodDescriptor* descriptor =
+ manager->GetInputMethodUtil()->GetInputMethodDescriptorFromId(
+ manager->GetInputMethodUtil()->GetHardwareInputMethodIds()[0]);
+ // If the hardware input method's keyboard layout is the same as the
+ // default input method (e.g. from GaiaScreen), use the hardware input
+ // method. Note that the hardware input method can be non-login-able.
+ // Refer to the issue chrome-os-partner:48623.
+ if (descriptor &&
+ descriptor->GetPreferredKeyboardLayout() ==
+ preferred_input_method.GetPreferredKeyboardLayout()) {
+ preferred_input_method = *descriptor;
+ }
}
// Derive kLanguagePreloadEngines from |locale| and |preferred_input_method|.
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698