OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/preferences.h" | 5 #include "chrome/browser/chromeos/preferences.h" |
6 | 6 |
7 #include "ash/magnifier/magnifier_constants.h" | 7 #include "ash/magnifier/magnifier_constants.h" |
8 #include "base/chromeos/chromeos_version.h" | 8 #include "base/chromeos/chromeos_version.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 input_method::kSearchKey, | 252 input_method::kSearchKey, |
253 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 253 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
254 registry->RegisterIntegerPref( | 254 registry->RegisterIntegerPref( |
255 prefs::kLanguageRemapControlKeyTo, | 255 prefs::kLanguageRemapControlKeyTo, |
256 input_method::kControlKey, | 256 input_method::kControlKey, |
257 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 257 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
258 registry->RegisterIntegerPref( | 258 registry->RegisterIntegerPref( |
259 prefs::kLanguageRemapAltKeyTo, | 259 prefs::kLanguageRemapAltKeyTo, |
260 input_method::kAltKey, | 260 input_method::kAltKey, |
261 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 261 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 262 // We don't sync the CapsLock remapping pref, since the UI hides this pref |
| 263 // on certain devices, so syncing a non-default value to a device that |
| 264 // doesn't allow changing the pref would be odd. http://crbug.com/167237 |
262 registry->RegisterIntegerPref( | 265 registry->RegisterIntegerPref( |
263 prefs::kLanguageRemapCapsLockKeyTo, | 266 prefs::kLanguageRemapCapsLockKeyTo, |
264 input_method::kCapsLockKey, | 267 input_method::kCapsLockKey, |
265 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 268 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
266 registry->RegisterIntegerPref( | 269 registry->RegisterIntegerPref( |
267 prefs::kLanguageRemapDiamondKeyTo, | 270 prefs::kLanguageRemapDiamondKeyTo, |
268 input_method::kControlKey, | 271 input_method::kControlKey, |
269 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 272 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
270 // We don't sync the following keyboard prefs since they are not user- | 273 // We don't sync the following keyboard prefs since they are not user- |
271 // configurable. | 274 // configurable. |
272 registry->RegisterBooleanPref( | 275 registry->RegisterBooleanPref( |
273 prefs::kLanguageXkbAutoRepeatEnabled, | 276 prefs::kLanguageXkbAutoRepeatEnabled, |
274 true, | 277 true, |
275 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 278 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 | 985 |
983 input_method::AutoRepeatRate rate; | 986 input_method::AutoRepeatRate rate; |
984 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); | 987 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); |
985 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); | 988 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); |
986 DCHECK(rate.initial_delay_in_ms > 0); | 989 DCHECK(rate.initial_delay_in_ms > 0); |
987 DCHECK(rate.repeat_interval_in_ms > 0); | 990 DCHECK(rate.repeat_interval_in_ms > 0); |
988 input_method::XKeyboard::SetAutoRepeatRate(rate); | 991 input_method::XKeyboard::SetAutoRepeatRate(rate); |
989 } | 992 } |
990 | 993 |
991 } // namespace chromeos | 994 } // namespace chromeos |
OLD | NEW |