Index: chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
index d1f76ce88417c1175de246f15e5ba50e0997af21..332632affae279e92df5a93b2fed42f8208f500b 100644 |
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
@@ -580,10 +580,13 @@ void GuestLanguageSetCallbackData::Callback( |
input_method::InputMethodManager::Get(); |
// Active layout must be hardware "login layout". |
// The previous one must be "locale default layout". |
- const std::string login_input_method = |
- ime_manager->GetInputMethodUtil()->GetHardwareLoginInputMethodId(); |
- ime_manager->ChangeInputMethod(login_input_method); |
+ // First, enable all hardware input methods. |
+ const std::vector<std::string>& input_methods = |
+ ime_manager->GetInputMethodUtil()->GetHardwareInputMethodIds(); |
+ for (size_t i = 0; i < input_methods.size(); ++i) |
+ ime_manager->EnableInputMethod(input_methods[i]); |
Hiro Komatsu
2014/02/14 07:16:51
EnableInputMethods?
Seigo Nonaka
2014/02/14 08:13:22
Done.
Alexander Alekseev
2014/02/14 13:59:17
NO!
Historically EnableInputMethods() is actually
Seigo Nonaka
2014/02/16 15:50:30
Nice catch!
Reverted to previous impl and renamed
|
+ // Second, enable locale based input methods. |
const std::string locale_default_input_method = |
ime_manager->GetInputMethodUtil()-> |
GetLanguageDefaultInputMethodId(loaded_locale); |
@@ -591,7 +594,13 @@ void GuestLanguageSetCallbackData::Callback( |
PrefService* user_prefs = self->profile->GetPrefs(); |
user_prefs->SetString(prefs::kLanguagePreviousInputMethod, |
locale_default_input_method); |
+ ime_manager->EnableInputMethod(locale_default_input_method); |
} |
+ |
+ // Finally, actrivate the first login input method. |
Hiro Komatsu
2014/02/14 07:16:51
typo: activate
Seigo Nonaka
2014/02/14 08:13:22
Done.
|
+ const std::vector<std::string>& login_input_methods = |
+ ime_manager->GetInputMethodUtil()->GetHardwareLoginInputMethodIds(); |
+ ime_manager->ChangeInputMethod(login_input_methods[0]); |
} |
void SetGuestLocale(UserManager* const usermanager, Profile* const profile) { |