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

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: Rebase. Use EnableInputMethod instead of EnableInputMethods. 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 a1c97356f7a0856d0e53da1e5e3adae962c05704..35ba1475d3cf0aecfdcf519b259f94830b77ff4d 100644
--- a/chrome/browser/chromeos/login/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/login_display_host_impl.cc
@@ -1140,9 +1140,8 @@ void ShowLoginWizard(const std::string& first_screen_name) {
if (!prefs->HasPrefPath(prefs::kApplicationLocale)) {
std::string locale = chromeos::StartupUtils::GetInitialLocale();
prefs->SetString(prefs::kApplicationLocale, locale);
- manager->EnableLayouts(
- locale,
- manager->GetInputMethodUtil()->GetHardwareInputMethodId());
+ manager->EnableLoginLayouts(
+ locale, manager->GetInputMethodUtil()->GetHardwareInputMethodId());
base::ThreadRestrictions::ScopedAllowIO allow_io;
const std::string loaded_locale =
ResourceBundle::GetSharedInstance().ReloadLocaleResources(locale);
@@ -1185,10 +1184,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));
@@ -1197,8 +1192,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
« no previous file with comments | « chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc ('k') | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698