Chromium Code Reviews| Index: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
| diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
| index d15de311a2a85e8c40d88ec512ad9dfc5d8d7ed4..93dd66ab56376b86cbd4407439e073611ff73467 100644 |
| --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
| +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
| @@ -35,6 +35,7 @@ |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| +#include "chrome/browser/chromeos/language_preferences.h" |
| #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h" |
| #include "chrome/browser/chromeos/login/hwid_checker.h" |
| #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| @@ -1436,6 +1437,7 @@ void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { |
| account_id); |
| } else { |
| SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); |
| + SetKeyboardSettings(account_id); |
| WallpaperManager::Get()->SetUserWallpaperDelayed(account_id); |
| bool use_24hour_clock = false; |
| @@ -1611,4 +1613,32 @@ void SigninScreenHandler::OnAllowedInputMethodsChanged() { |
| } |
| } |
| +void SigninScreenHandler::SetKeyboardSettings(const AccountId& account_id) { |
| + bool auto_repeat_enabled = true; |
| + if (user_manager::known_user::GetBooleanPref( |
| + account_id, prefs::kLanguageXkbAutoRepeatEnabled, |
| + &auto_repeat_enabled) && |
| + !auto_repeat_enabled) { |
| + input_method::InputMethodManager::Get() |
| + ->GetImeKeyboard() |
| + ->SetAutoRepeatEnabled(false); |
|
xiyuan
2017/02/17 23:58:09
Do we need to do this when the pref is not found?
xdai1
2017/02/18 00:12:57
|auto_repeat_enabled|, |auto_repeat_delay| and |au
xiyuan
2017/02/18 00:15:52
Acknowledged.
|
| + return; |
| + } |
| + |
| + int auto_repeat_delay = language_prefs::kXkbAutoRepeatDelayInMs; |
| + int auto_repeat_interval = language_prefs::kXkbAutoRepeatIntervalInMs; |
| + user_manager::known_user::GetIntegerPref( |
| + account_id, prefs::kLanguageXkbAutoRepeatDelay, &auto_repeat_delay); |
| + user_manager::known_user::GetIntegerPref( |
| + account_id, prefs::kLanguageXkbAutoRepeatInterval, &auto_repeat_interval); |
| + input_method::AutoRepeatRate rate; |
| + rate.initial_delay_in_ms = auto_repeat_delay; |
| + rate.repeat_interval_in_ms = auto_repeat_interval; |
| + input_method::InputMethodManager::Get() |
| + ->GetImeKeyboard() |
| + ->SetAutoRepeatEnabled(true); |
| + input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( |
| + rate); |
| +} |
| + |
| } // namespace chromeos |