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

Unified Diff: chrome/browser/chromeos/login/login_display_host_impl.cc

Issue 133273032: Guest Mode: input method should default to the underlying latin keyboard layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed owner's layouts from Guest mode. Created 6 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
Index: chrome/browser/chromeos/login/login_display_host_impl.cc
diff --git a/chrome/browser/chromeos/login/login_display_host_impl.cc b/chrome/browser/chromeos/login/login_display_host_impl.cc
index 9314bf0c93f390320d29807b8703062590715d3e..52c5a1e0166aa3c6bc28ac7cf91188bcea537555 100644
--- a/chrome/browser/chromeos/login/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/login_display_host_impl.cc
@@ -1138,7 +1138,8 @@ void ShowLoginWizard(const std::string& first_screen_name) {
prefs->SetString(prefs::kApplicationLocale, locale);
manager->EnableLayouts(
locale,
- manager->GetInputMethodUtil()->GetHardwareInputMethodId());
+ manager->GetInputMethodUtil()->GetHardwareInputMethodId(),
+ true /* login_layouts_only */);
base::ThreadRestrictions::ScopedAllowIO allow_io;
const std::string loaded_locale =
ResourceBundle::GetSharedInstance().ReloadLocaleResources(locale);
@@ -1181,10 +1182,6 @@ void ShowLoginWizard(const std::string& first_screen_name) {
// initial locale and save it in preferences.
DetermineAndSaveHardwareKeyboard(locale, layout);
- // Then, enable the hardware keyboard.
- manager->EnableLayouts(
- locale, manager->GetInputMethodUtil()->GetHardwareInputMethodId());
-
scoped_ptr<ShowLoginWizardSwitchLanguageCallbackData> data(
new ShowLoginWizardSwitchLanguageCallbackData(
first_screen_name, startup_manifest, display_host));
@@ -1193,8 +1190,9 @@ void ShowLoginWizard(const std::string& first_screen_name) {
new locale_util::SwitchLanguageCallback(
base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
- // Do not load locale keyboards here.
- locale_util::SwitchLanguage(locale, false, callback.Pass());
+ // Load locale keyboards here. Hardware layout would be automatically enabled.
+ locale_util::SwitchLanguage(
+ locale, true, true /* login_layouts_only */, callback.Pass());
}
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698